From 66cab325585d3a2f4957b8a4799f09a681ead0a4 Mon Sep 17 00:00:00 2001 From: Robert Swoboda <53216935+Gengar-i@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:43:16 +0100 Subject: [PATCH] Changed Content type to content type --- .../Core/Command/CleanupVersionsCommand.php | 2 +- .../Command/ExpireUserPasswordsCommand.php | 8 +-- .../Command/ResizeOriginalImagesCommand.php | 4 +- .../Parser/UserContentTypeIdentifier.php | 2 +- .../Features/Context/ContentTypeContext.php | 36 ++++++------ .../Features/Context/FieldTypeContext.php | 12 ++-- .../Target/Builder/VersionBuilder.php | 4 +- .../Persistence/Content/Relation.php | 2 +- .../Content/Relation/CreateStruct.php | 2 +- .../Persistence/Content/Type/Handler.php | 6 +- .../Repository/ContentTypeService.php | 30 +++++----- src/contracts/Repository/Repository.php | 4 +- src/contracts/Repository/UserService.php | 2 +- .../Repository/Values/Content/ContentInfo.php | 4 +- .../Repository/Values/Content/Relation.php | 2 +- .../FieldDefinitionCreateStruct.php | 2 +- .../FieldDefinitionUpdateStruct.php | 2 +- .../MissingUserFieldTypeException.php | 2 +- src/lib/FieldType/Author/Type.php | 4 +- src/lib/FieldType/FieldType.php | 4 +- src/lib/FieldType/ImageAsset/AssetMapper.php | 2 +- .../Persistence/Cache/ContentTypeHandler.php | 2 +- src/lib/Persistence/Cache/Readme.md | 56 ++++++++++--------- .../Legacy/Content/Type/Gateway.php | 20 +++---- .../Content/Type/Gateway/DoctrineDatabase.php | 8 +-- .../Legacy/Content/Type/Handler.php | 2 +- .../Legacy/Content/Type/Mapper.php | 2 +- .../Legacy/Content/Type/Update/Handler.php | 6 +- .../Legacy/Exception/TypeGroupNotFound.php | 2 +- .../Legacy/Exception/TypeNotFound.php | 2 +- .../Content/Type/BaseQueryBuilder.php | 2 +- .../Content/Type/GroupIdQueryBuilder.php | 2 +- .../Content/Type/IdQueryBuilder.php | 2 +- .../Content/Type/IdentifierQueryBuilder.php | 2 +- src/lib/Repository/ContentTypeService.php | 42 +++++++------- .../Repository/Helper/NameSchemaService.php | 2 +- src/lib/Repository/Mapper/ContentMapper.php | 8 +-- src/lib/Repository/Repository.php | 4 +- src/lib/Repository/UserService.php | 2 +- .../ContentTypeIdentifier.php | 2 +- .../Gateway/CriterionHandler/FieldBase.php | 2 +- .../Gateway/SortClauseHandler/Field.php | 2 +- .../WordIndexer/Gateway/DoctrineDatabase.php | 2 +- .../integration/Core/Repository/BaseTest.php | 2 +- .../Core/Repository/ContentServiceTest.php | 6 +- .../Repository/ContentTypeServiceTest.php | 38 ++++++------- .../FieldType/BaseIntegrationTest.php | 2 +- .../SearchMultivaluedBaseIntegrationTest.php | 2 +- .../BaseRepositoryFilteringTestCase.php | 2 +- .../EZP22408DeleteRelatedObjectTest.php | 2 +- .../Repository/SearchEngineIndexingTest.php | 2 +- .../Core/Repository/URLAliasServiceTest.php | 4 +- .../Core/Repository/UserServiceTest.php | 2 +- .../Legacy/Content/ContentHandlerTest.php | 2 +- .../ContentUpdater/Action/AddFieldTest.php | 2 +- .../Type/ContentTypeQueryBuildersTest.php | 2 +- .../Legacy/TransactionHandlerTest.php | 2 +- .../Repository/Service/Mock/ContentTest.php | 6 +- 58 files changed, 194 insertions(+), 192 deletions(-) diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index f0a86525f6..82d3bb0a33 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -101,7 +101,7 @@ protected function configure() 'excluded-content-types', null, InputOption::VALUE_OPTIONAL, - 'Comma-separated list of Content type identifiers whose versions should not be removed, for instance `article`.', + 'Comma-separated list of content type identifiers whose versions should not be removed, for instance `article`.', self::DEFAULT_EXCLUDED_CONTENT_TYPES )->setHelp( <<addOption( 'force', @@ -107,7 +107,7 @@ protected function configure(): void 'password-ttl', 't', InputOption::VALUE_REQUIRED, - 'After how many days passwords expire. Set when Content type needs to be updated.', + 'After how many days passwords expire. Set when content type needs to be updated.', self::DEFAULT_PASSWORD_TTL ) ->setHelp( @@ -271,7 +271,7 @@ private function supplySearchCriteria( if (!empty($userContentTypeIdentifiers)) { $output->writeln( sprintf( - "\tUser Content type Identifier: %s", + "\tUser content type Identifier: %s", implode(', ', $userContentTypeIdentifiers) ) ); @@ -425,7 +425,7 @@ private function doesContentTypeNeedUpdate(ContentType $contentType, array $proc if ($count !== 1) { throw new InvalidArgumentException(sprintf( - 'Expected exactly 1 "%s" field type in "%s" Content type, found %d', + 'Expected exactly 1 "%s" field type in "%s" content type, found %d', self::USER_FIELDTYPE_IDENTIFIER, $contentType->identifier, $count diff --git a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php index c22ec73337..52f5f5bc4d 100644 --- a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php +++ b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php @@ -114,7 +114,7 @@ protected function configure() ->addArgument( 'contentTypeIdentifier', InputArgument::REQUIRED, - 'Identifier of a Content type which has an ezimage Field Type.' + 'Identifier of a content type which has an ezimage Field Type.' ) ->addOption( 'filter', @@ -150,7 +150,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!$fieldType || $fieldType->fieldTypeIdentifier !== 'ezimage') { $output->writeln( sprintf( - "Field Type with identifier '%s' in Content type '%s' must be 'ezimage', you provided '%s'.", + "Field Type with identifier '%s' in content type '%s' must be 'ezimage', you provided '%s'.", $imageFieldIdentifier, $contentType->identifier, $fieldType ? $fieldType->fieldTypeIdentifier : '' diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php index 4f36eb86bb..21005138b3 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php @@ -36,7 +36,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) { $nodeBuilder ->arrayNode('user_content_type_identifier') - ->info('User Content type identifier configuration.') + ->info('User content type identifier configuration.') ->example(['user', 'my_custom_user_identifier']) ->requiresAtLeastOneElement() ->prototype('scalar')->end() diff --git a/src/bundle/Core/Features/Context/ContentTypeContext.php b/src/bundle/Core/Features/Context/ContentTypeContext.php index 62eb7503d1..e67fb58664 100644 --- a/src/bundle/Core/Features/Context/ContentTypeContext.php +++ b/src/bundle/Core/Features/Context/ContentTypeContext.php @@ -13,7 +13,7 @@ use PHPUnit\Framework\Assert as Assertion; /** - * Sentences for Content types. + * Sentences for content types. */ class ContentTypeContext implements Context { @@ -36,13 +36,13 @@ public function __construct(ContentTypeService $contentTypeService) } /** - * @Given (that) a Content type exists with identifier :identifier with fields: - * @Given (that) a Content type exists with identifier :identifier in Group with identifier :groupIdentifier with fields: + * @Given (that) a content type exists with identifier :identifier with fields: + * @Given (that) a content type exists with identifier :identifier in Group with identifier :groupIdentifier with fields: * | Identifier | Type | Name | * | title | ezstring | Title | * | body | ezxml | Body | * - * Makes sure a Content type with $identifier and with the provided $fields definition. + * Makes sure a content type with $identifier and with the provided $fields definition. */ public function ensureContentTypeWithIndentifier( $identifier, @@ -60,9 +60,9 @@ public function ensureContentTypeWithIndentifier( } /** - * @Given (that) a Content type does not exist with identifier :identifier + * @Given (that) a content type does not exist with identifier :identifier * - * Makes sure a Content type with $identifier does not exist. + * Makes sure a content type with $identifier does not exist. * If it exists deletes it. */ public function ensureContentTypeDoesntExist($identifier) @@ -74,46 +74,46 @@ public function ensureContentTypeDoesntExist($identifier) } /** - * @Then Content type (with identifier) :identifier exists + * @Then content type (with identifier) :identifier exists * - * Verifies that a Content type with $identifier exists. + * Verifies that a content type with $identifier exists. */ public function assertContentTypeExistsByIdentifier($identifier) { Assertion::assertTrue( $this->checkContentTypeExistenceByIdentifier($identifier), - "Couldn't find a Content type with identifier '$identifier'." + "Couldn't find a content type with identifier '$identifier'." ); } /** - * @Then Content type (with identifier) :identifier does not exist + * @Then content type (with identifier) :identifier does not exist * - * Verifies that a Content type with $identifier does not exist. + * Verifies that a content type with $identifier does not exist. */ public function assertContentTypeDoesntExistsByIdentifier($identifier) { Assertion::assertFalse( $this->checkContentTypeExistenceByIdentifier($identifier), - "Found a Content type with identifier '$identifier'." + "Found a content type with identifier '$identifier'." ); } /** - * @Then Content type (with identifier) :identifier exists in Group with identifier :groupIdentifier + * @Then content type (with identifier) :identifier exists in Group with identifier :groupIdentifier * - * Verifies that a Content type with $identifier exists in group with identifier $groupIdentifier. + * Verifies that a content type with $identifier exists in group with identifier $groupIdentifier. */ public function assertContentTypeExistsByIdentifierOnGroup($identifier, $groupIdentifier) { Assertion::assertTrue( $this->checkContentTypeExistenceByIdentifier($identifier, $groupIdentifier), - "Couldn't find Content type with identifier '$identifier' on '$groupIdentifier." + "Couldn't find content type with identifier '$identifier' on '$groupIdentifier." ); } /** - * Load and return a Content type by its identifier. + * Load and return a content type by its identifier. * * @param string $identifier Content type identifier * @param bool $throwIfNotFound if true, throws an exception if it is not found. @@ -137,7 +137,7 @@ protected function loadContentTypeByIdentifier($identifier, $throwIfNotFound = t } /** - * Creates a Content type with $identifier on Content type group with identifier $groupIdentifier and with the + * Creates a content type with $identifier on content type group with identifier $groupIdentifier and with the * given 'fields' definitions. * * @param string $groupIdentifier Content type group identifier @@ -217,7 +217,7 @@ protected function assignContentGroupTypeToContentType($contentType, $contentTyp } /** - * Verifies that a Content type with $identifier exists. + * Verifies that a content type with $identifier exists. * * @param string $identifier * diff --git a/src/bundle/Core/Features/Context/FieldTypeContext.php b/src/bundle/Core/Features/Context/FieldTypeContext.php index 9fffd17b3e..9ce8cd3b85 100644 --- a/src/bundle/Core/Features/Context/FieldTypeContext.php +++ b/src/bundle/Core/Features/Context/FieldTypeContext.php @@ -339,8 +339,8 @@ private function getActualFieldPosition() } /** - * @Given a Content Type with an :fieldType field exists - * @Given a Content Type with an :fieldType with field definition name :name exists + * @Given a content type with an :fieldType field exists + * @Given a content type with an :fieldType with field definition name :name exists * * Creates a ContentType with only the desired FieldType. */ @@ -350,8 +350,8 @@ public function createContentTypeWithFieldType($fieldType, $name = null) } /** - * @Given a Content Type with a required :fieldType field exists - * @Given a Content Type with a required :fieldType with field definition name :name exists + * @Given a content type with a required :fieldType field exists + * @Given a content type with a required :fieldType with field definition name :name exists * * Creates a ContentType with only the desired FieldType. */ @@ -372,8 +372,8 @@ 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: + * @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) { diff --git a/src/contracts/Limitation/Target/Builder/VersionBuilder.php b/src/contracts/Limitation/Target/Builder/VersionBuilder.php index fe789f320b..baff618ec0 100644 --- a/src/contracts/Limitation/Target/Builder/VersionBuilder.php +++ b/src/contracts/Limitation/Target/Builder/VersionBuilder.php @@ -59,7 +59,7 @@ public function translateToAnyLanguageOf(array $languageCodes): self } /** - * Set intent to create Content from unspecified (yet) Content type, any from the given list. + * Set intent to create Content from unspecified (yet) content type, any from the given list. * * @param int[] $contentTypeIds * @@ -71,7 +71,7 @@ public function createFromAnyContentTypeOf(array $contentTypeIds): self { foreach ($contentTypeIds as $contentTypeId) { if (!\is_int($contentTypeId)) { - throw new InvalidArgumentException('$contentTypeIds', 'All Content type IDs must be integers'); + throw new InvalidArgumentException('$contentTypeIds', 'All content type IDs must be integers'); } } diff --git a/src/contracts/Persistence/Content/Relation.php b/src/contracts/Persistence/Content/Relation.php index 2952eec4b2..502c972faa 100644 --- a/src/contracts/Persistence/Content/Relation.php +++ b/src/contracts/Persistence/Content/Relation.php @@ -35,7 +35,7 @@ class Relation extends ValueObject public $sourceContentVersionNo; /** - * Source Content Type Field Definition Id. + * Source content type Field Definition Id. * * @var mixed */ diff --git a/src/contracts/Persistence/Content/Relation/CreateStruct.php b/src/contracts/Persistence/Content/Relation/CreateStruct.php index 3fc896ab79..3c046ffa36 100644 --- a/src/contracts/Persistence/Content/Relation/CreateStruct.php +++ b/src/contracts/Persistence/Content/Relation/CreateStruct.php @@ -28,7 +28,7 @@ class CreateStruct extends ValueObject public $sourceContentVersionNo; /** - * Source Content Type Field Definition Id. + * Source content type Field Definition Id. * * @var mixed */ diff --git a/src/contracts/Persistence/Content/Type/Handler.php b/src/contracts/Persistence/Content/Type/Handler.php index c115ac4e93..82b9dfcf9d 100644 --- a/src/contracts/Persistence/Content/Type/Handler.php +++ b/src/contracts/Persistence/Content/Type/Handler.php @@ -42,7 +42,7 @@ public function deleteGroup($groupId); public function loadGroup($groupId); /** - * Return list of unique Content Type Groups, with group id as key. + * Return list of unique content type Groups, with group id as key. * * Missing items (NotFound) will be missing from the array and not cause an exception, it's up * to calling logic to determine if this should cause exception or not. @@ -80,7 +80,7 @@ public function loadAllGroups(); public function loadContentTypes($groupId, $status = Type::STATUS_DEFINED); /** - * Return list of unique Content Types, with type id as key. + * Return list of unique content types, with type id as key. * * Missing items (NotFound) will be missing from the array and not cause an exception, it's up * to calling logic to determine if this should cause exception or not. @@ -175,7 +175,7 @@ public function createDraft($modifierId, $contentTypeId); /** * Copy a Type incl fields and group-relations from a given status to a new Type with status {@link Type::STATUS_DRAFT}. * - * New Content Type will have $userId as creator / modifier, created / modified should be updated, new remoteId created + * New content type will have $userId as creator / modifier, created / modified should be updated, new remoteId created * and identifier should be 'copy_of__' or another unique string. * * @param mixed $userId diff --git a/src/contracts/Repository/ContentTypeService.php b/src/contracts/Repository/ContentTypeService.php index cd307b54ff..e46e819c47 100644 --- a/src/contracts/Repository/ContentTypeService.php +++ b/src/contracts/Repository/ContentTypeService.php @@ -23,7 +23,7 @@ interface ContentTypeService { /** - * Create a Content Type Group object. + * Create a content type Group object. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException if the user is not allowed to create a content type group * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If a group with the same identifier already exists @@ -35,7 +35,7 @@ interface ContentTypeService public function createContentTypeGroup(ContentTypeGroupCreateStruct $contentTypeGroupCreateStruct): ContentTypeGroup; /** - * Get a Content Type Group object by id. + * Get a content type Group object by id. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If group can not be found * @@ -47,7 +47,7 @@ public function createContentTypeGroup(ContentTypeGroupCreateStruct $contentType public function loadContentTypeGroup(int $contentTypeGroupId, array $prioritizedLanguages = []): ContentTypeGroup; /** - * Get a Content Type Group object by identifier. + * Get a content type Group object by identifier. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If group can not be found * @@ -59,7 +59,7 @@ public function loadContentTypeGroup(int $contentTypeGroupId, array $prioritized public function loadContentTypeGroupByIdentifier(string $contentTypeGroupIdentifier, array $prioritizedLanguages = []): ContentTypeGroup; /** - * Get all Content Type Groups. + * Get all content type Groups. * * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object. * @@ -68,7 +68,7 @@ public function loadContentTypeGroupByIdentifier(string $contentTypeGroupIdentif public function loadContentTypeGroups(array $prioritizedLanguages = []): iterable; /** - * Update a Content Type Group object. + * Update a content type Group object. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException if the user is not allowed to create a content type group * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the given identifier (if set) already exists @@ -79,7 +79,7 @@ public function loadContentTypeGroups(array $prioritizedLanguages = []): iterabl public function updateContentTypeGroup(ContentTypeGroup $contentTypeGroup, ContentTypeGroupUpdateStruct $contentTypeGroupUpdateStruct): void; /** - * Delete a Content Type Group. + * Delete a content type Group. * * This method only deletes an content type group which has content types without any content instances * @@ -91,7 +91,7 @@ public function updateContentTypeGroup(ContentTypeGroup $contentTypeGroup, Conte public function deleteContentTypeGroup(ContentTypeGroup $contentTypeGroup): void; /** - * Create a Content Type object. + * Create a content type object. * * The content type is created in the state STATUS_DRAFT. * @@ -112,7 +112,7 @@ public function deleteContentTypeGroup(ContentTypeGroup $contentTypeGroup): void public function createContentType(ContentTypeCreateStruct $contentTypeCreateStruct, array $contentTypeGroups): ContentTypeDraft; /** - * Get a Content Type object by id. + * Get a content type object by id. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If a content type with the given id and status DEFINED can not be found * @@ -124,7 +124,7 @@ public function createContentType(ContentTypeCreateStruct $contentTypeCreateStru public function loadContentType(int $contentTypeId, array $prioritizedLanguages = []): ContentType; /** - * Get a Content Type object by identifier. + * Get a content type object by identifier. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If content type with the given identifier and status DEFINED can not be found * @@ -136,7 +136,7 @@ public function loadContentType(int $contentTypeId, array $prioritizedLanguages public function loadContentTypeByIdentifier(string $identifier, array $prioritizedLanguages = []): ContentType; /** - * Get a Content Type object by id. + * Get a content type object by id. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If content type with the given remote id and status DEFINED can not be found * @@ -148,7 +148,7 @@ public function loadContentTypeByIdentifier(string $identifier, array $prioritiz public function loadContentTypeByRemoteId(string $remoteId, array $prioritizedLanguages = []): ContentType; /** - * Get a Content Type object draft by id. + * Get a content type object draft by id. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If the content type draft owned by the current user can not be found * @@ -160,7 +160,7 @@ public function loadContentTypeByRemoteId(string $remoteId, array $prioritizedLa public function loadContentTypeDraft(int $contentTypeId, bool $ignoreOwnership = false): ContentTypeDraft; /** - * Bulk-load Content Type objects by ids. + * Bulk-load content type objects by ids. * * Note: it does not throw exceptions on load, just ignores erroneous items. * @@ -174,7 +174,7 @@ public function loadContentTypeDraft(int $contentTypeId, bool $ignoreOwnership = public function loadContentTypeList(array $contentTypeIds, array $prioritizedLanguages = []): iterable; /** - * Get Content Type objects which belong to the given content type group. + * Get content type objects which belong to the given content type group. * * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup $contentTypeGroup * @param string[] $prioritizedLanguages Used as prioritized language code on translated properties of returned object. @@ -199,7 +199,7 @@ public function loadContentTypes(ContentTypeGroup $contentTypeGroup, array $prio public function createContentTypeDraft(ContentType $contentType): ContentTypeDraft; /** - * Update a Content Type object. + * Update a content type object. * * Does not update fields (fieldDefinitions), use {@link updateFieldDefinition()} to update them. * @@ -212,7 +212,7 @@ public function createContentTypeDraft(ContentType $contentType): ContentTypeDra public function updateContentTypeDraft(ContentTypeDraft $contentTypeDraft, ContentTypeUpdateStruct $contentTypeUpdateStruct): void; /** - * Delete a Content Type object. + * Delete a content type object. * * Deletes a content type if it has no instances. If content type in state STATUS_DRAFT is * given, only the draft content type will be deleted. Otherwise, if content type in state diff --git a/src/contracts/Repository/Repository.php b/src/contracts/Repository/Repository.php index 81dab1ca99..ae678a8642 100644 --- a/src/contracts/Repository/Repository.php +++ b/src/contracts/Repository/Repository.php @@ -55,9 +55,9 @@ public function getContentService(): ContentService; public function getContentLanguageService(): LanguageService; /** - * Get Content Type Service. + * Get content type Service. * - * Get service object to perform operations on Content Type objects and it's aggregate members. + * Get service object to perform operations on content type objects and it's aggregate members. * ( Group, Field & FieldCategory ) * * @return \Ibexa\Contracts\Core\Repository\ContentTypeService diff --git a/src/contracts/Repository/UserService.php b/src/contracts/Repository/UserService.php index 1d71393409..6a24f0721e 100644 --- a/src/contracts/Repository/UserService.php +++ b/src/contracts/Repository/UserService.php @@ -356,7 +356,7 @@ public function isUserGroup(Content $content): bool; * @param string $email the email of the new user * @param string $password the plain password of the new user * @param string $mainLanguageCode the main language for the underlying content object - * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType Content Type for the underlying content object. + * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType content type for the underlying content object. * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserCreateStruct */ diff --git a/src/contracts/Repository/Values/Content/ContentInfo.php b/src/contracts/Repository/Values/Content/ContentInfo.php index a2cc8b08b5..c271f36824 100644 --- a/src/contracts/Repository/Values/Content/ContentInfo.php +++ b/src/contracts/Repository/Values/Content/ContentInfo.php @@ -16,7 +16,7 @@ * This class provides all version independent information of the Content object. * * @property-read int $id @deprecated Use {@see ContentInfo::getId} instead. The unique id of the Content object - * @property-read int $contentTypeId The unique id of the Content Type object the Content object is an instance of + * @property-read int $contentTypeId The unique id of the content type object the Content object is an instance of * @property-read string $name the computed name (via name schema) in the main language of the Content object * @property-read int $sectionId the section to which the Content object is assigned * @property-read int $currentVersionNo Current Version number is the version number of the published version or the version number of a newly created draft (which is 1). @@ -45,7 +45,7 @@ class ContentInfo extends ValueObject protected $id; /** - * The Content Type id of the Content object. + * The content type id of the Content object. * * @var int */ diff --git a/src/contracts/Repository/Values/Content/Relation.php b/src/contracts/Repository/Values/Content/Relation.php index c7c26041b2..7922e4f8fa 100644 --- a/src/contracts/Repository/Values/Content/Relation.php +++ b/src/contracts/Repository/Values/Content/Relation.php @@ -64,7 +64,7 @@ abstract class Relation extends ValueObject protected $id; /** - * Source Content Type Field Definition Id. + * Source content type Field Definition Id. * For relation not of type RelationType::COMMON this field denotes the field definition id * of the attribute where the relation is anchored. * diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php b/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php index 8189d38aba..c4763233dc 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php @@ -27,7 +27,7 @@ class FieldDefinitionCreateStruct extends ValueObject /** * Readable string identifier of a field definition. * - * Needs to be unique within the context of the Content Type this is added to. + * Needs to be unique within the context of the content type this is added to. * * Required. * diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php b/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php index c5696bc6d2..d2bb8c0d35 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php @@ -18,7 +18,7 @@ class FieldDefinitionUpdateStruct extends ValueObject /** * If set the identifier of a field definition is changed to this value. * - * Needs to be unique within the context of the Content Type this is added to. + * Needs to be unique within the context of the content type this is added to. * * @var string */ diff --git a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php index cb59aeb7b8..495acb4553 100644 --- a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php +++ b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php @@ -16,7 +16,7 @@ final class MissingUserFieldTypeException extends ContentValidationException public function __construct(ContentType $contentType, string $fieldType) { parent::__construct( - 'The provided Content type "%contentType%" does not contain the %fieldType% Field Type', + 'The provided content type "%contentType%" does not contain the %fieldType% Field Type', [ 'contentType' => $contentType->identifier, 'fieldType' => $fieldType, diff --git a/src/lib/FieldType/Author/Type.php b/src/lib/FieldType/Author/Type.php index 2a9526de38..61db3acff0 100644 --- a/src/lib/FieldType/Author/Type.php +++ b/src/lib/FieldType/Author/Type.php @@ -25,13 +25,13 @@ class Type extends FieldType implements TranslationContainerInterface { /** * Flag which stands for setting Author FieldType empty by default. - * It is used in a Content Type edit view. + * It is used in a content type edit view. */ public const DEFAULT_VALUE_EMPTY = 0; /** * Flag which stands for prefilling Author FieldType with current user by default. - * It is used in a Content Type edit view. + * It is used in a content type edit view. */ public const DEFAULT_CURRENT_USER = 1; diff --git a/src/lib/FieldType/FieldType.php b/src/lib/FieldType/FieldType.php index cde28bfc4f..a635a8c47b 100644 --- a/src/lib/FieldType/FieldType.php +++ b/src/lib/FieldType/FieldType.php @@ -24,12 +24,12 @@ * interfaces the field type implements support for. These individual * capabilities can also be checked via the supports*() methods. * - * Field types are the base building blocks of Content Types, and serve as + * Field types are the base building blocks of content types, and serve as * data containers for Content objects. Therefore, while field types can be used * independently, they are designed to be used as a part of a Content object. * * Field types are primed and pre-configured with the Field Definitions found in - * Content Types. + * Content types. */ abstract class FieldType extends SPIFieldType implements Comparable { diff --git a/src/lib/FieldType/ImageAsset/AssetMapper.php b/src/lib/FieldType/ImageAsset/AssetMapper.php index 57ea0185f9..179409f217 100644 --- a/src/lib/FieldType/ImageAsset/AssetMapper.php +++ b/src/lib/FieldType/ImageAsset/AssetMapper.php @@ -154,7 +154,7 @@ public function isAsset(Content $content): bool } /** - * Return identifier of the Content Type used as Assets. + * Return identifier of the content type used as Assets. */ public function getContentTypeIdentifier(): string { diff --git a/src/lib/Persistence/Cache/ContentTypeHandler.php b/src/lib/Persistence/Cache/ContentTypeHandler.php index ea88cd828c..5dc44db06b 100644 --- a/src/lib/Persistence/Cache/ContentTypeHandler.php +++ b/src/lib/Persistence/Cache/ContentTypeHandler.php @@ -560,7 +560,7 @@ public function publish($typeId) $this->cacheIdentifierGenerator->generateTag(self::CONTENT_FIELDS_TYPE_IDENTIFIER, [$typeId]), ]); - // Clear Content Type Groups list cache + // Clear content type Groups list cache $contentType = $this->load($typeId); $this->cache->deleteItems( array_map( diff --git a/src/lib/Persistence/Cache/Readme.md b/src/lib/Persistence/Cache/Readme.md index 90ba323e20..cfafcac2f9 100644 --- a/src/lib/Persistence/Cache/Readme.md +++ b/src/lib/Persistence/Cache/Readme.md @@ -1,4 +1,3 @@ - # CORE DEV DOC: Persistence\Cache SPI Persistence Cache is a layer aiming to cache calls to Persistence (backend database) deemed costly under load. It @@ -8,59 +7,62 @@ tries to balance this need up against the complexity and additional [system over Handlers using `AbstractHandler` internally consist of one cache layer: -- "Shared cache": A Symfony Cache based cache pool, supporting a range of cache adapters like filesystem, Redis, Memcached. - Note: Due to being shared by design, clusters need remote cache, thus multi lookups are strongly advised to reduce round trip latency. +- "Shared cache": A Symfony Cache based cache pool, supporting a range of cache adapters like filesystem, Redis, Memcached. + Note: Due to being shared by design, clusters need remote cache, thus multi lookups are strongly advised to reduce round trip latency. Handlers using `AbstractInMemoryHandler` / `AbstractInMemoryPersistenceHandler` in addition add a second cache layer in front of "Shared cache": -- "InMemory cache": A burst cache in PHP aiming at covering the most heavily used parts of the Content model to reduce repeated lookups to remote cache system. - Note: It's not shared but per request/process. To keep risk of race condition negligible, it has own milliseconds ttl & item limits. +- "InMemory cache": A burst cache in PHP aiming at covering the most heavily used parts of the Content model to reduce repeated lookups to remote cache system. + Note: It's not shared but per request/process. To keep risk of race condition negligible, it has own milliseconds ttl & item limits. There are abstract test classes for the respective abstract classes above, these are opinionated and enforce conventions to: -- Avoid too much logic in cache logic _(e.g. warm-up logic)_, which can be a source of bugs. -- Avoids having to write error-prone test cases for every method. -_This ensures the cache layer is far less complex to maintain and evolve than what was the case in 1.x._ +- Avoid too much logic in cache logic _(e.g. warm-up logic)_, which can be a source of bugs. +- Avoids having to write error-prone test cases for every method. +_This ensures the cache layer is far less complex to maintain and evolve than what was the case in 1.x._ ### Tags List of content tags that can be somewhat safely "semi-officially" used to clear related entities in cache: -- `c-`: Cache tag which refers to Content/ContentInfo entity. -- `l-`: Cache tag which refers to Locations and/or their assigned Content/ContentInfo entities. -- `lp-`: Like the tag above but applied to all Content/Locations in the subtree of this ID, so it can be used by tree operations. -- `cft-`: Cache tag which refers to entries containing Field data. It's used on Content Type changes that affect all Content items of the type. -_For further tags used for other internal use cases, see the *Handlers for how they are used._ +- `c-`: Cache tag which refers to Content/ContentInfo entity. +- `l-`: Cache tag which refers to Locations and/or their assigned Content/ContentInfo entities. +- `lp-`: Like the tag above but applied to all Content/Locations in the subtree of this ID, so it can be used by tree operations. +- `cft-`: Cache tag which refers to entries containing Field data. It's used on content type changes that affect all Content items of the type. +_For further tags used for other internal use cases, see the \*Handlers for how they are used._ ## Guidelines for core development ### Shared Cache: When to use, when not to use It's worth noting that shared cache comes at a cost: -- Increased complexity -- Latency per round trip -- Memory use -Because of that, *typically* avoid introducing cache if: -- Lookup is per user => _it will consume a lot of memory and have very low hit ratio_ -- For drafts => _usually belongs to a single user and is short-lived_ -- Infrequently used lookups -- Lookups that are fast against DB even under load _(see also notes in "Possible future plans")_ +- Increased complexity +- Latency per round trip +- Memory use +Because of that, _typically_ avoid introducing cache if: + +- Lookup is per user => _it will consume a lot of memory and have very low hit ratio_ +- For drafts => _usually belongs to a single user and is short-lived_ +- Infrequently used lookups +- Lookups that are fast against DB even under load _(see also notes in "Possible future plans")_ ### Tags: When to use, when not to use Like cache, tags also comes at a cost: -- Slower invalidation -- Memory cost - - _E.g.: ATM on RedisTagAwareAdapter tag relation data is even non-expiring as it needs to guarantee surviving cache._ + +- Slower invalidation +- Memory cost + - _E.g.: ATM on RedisTagAwareAdapter tag relation data is even non-expiring as it needs to guarantee surviving cache._ For those reasons, only introduce use a tag: -- Mainly to represent an entity _(e.g. `c-`)_ -- Only if it's represented on many different cache keys or if a key can have a lot of different variants. - - _Tip: Otherwise prefer to delete by cache key(s) when cache clear is needed, it will be faster and consume less memory._ + +- Mainly to represent an entity _(e.g. `c-`)_ +- Only if it's represented on many different cache keys or if a key can have a lot of different variants. + - _Tip: Otherwise prefer to delete by cache key(s) when cache clear is needed, it will be faster and consume less memory._ ### Possible future considerations diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway.php b/src/lib/Persistence/Legacy/Content/Type/Gateway.php index 769f917ee6..f99b4b7526 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway.php @@ -15,7 +15,7 @@ use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; /** - * Content Type Gateway. + * Content type Gateway. * * @internal For internal use by Persistence Handlers. */ @@ -52,7 +52,7 @@ abstract public function loadGroupDataByIdentifier(string $identifier): array; abstract public function loadAllGroupsData(): array; /** - * Load data for all Content Types of the given status, belonging to the given Group. + * Load data for all content types of the given status, belonging to the given Group. */ abstract public function loadTypesDataForGroup(int $groupId, int $status): array; @@ -62,14 +62,14 @@ abstract public function loadTypesDataForGroup(int $groupId, int $status): array abstract public function insertType(Type $type, ?int $typeId = null): int; /** - * Assign a Content Type of the given status (published, draft) to Content Type Group. + * Assign a content type of the given status (published, draft) to content type Group. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if the given Group does not exist */ abstract public function insertGroupAssignment(int $groupId, int $typeId, int $status): void; /** - * Delete a Group assignments for Content Type of the given status (published, draft). + * Delete a Group assignments for content type of the given status (published, draft). */ abstract public function deleteGroupAssignment(int $groupId, int $typeId, int $status): void; @@ -80,7 +80,7 @@ abstract public function deleteGroupAssignment(int $groupId, int $typeId, int $s abstract public function loadFieldDefinition(int $id, int $status): array; /** - * Insert a Field Definition into Content Type. + * Insert a Field Definition into content type. */ abstract public function insertFieldDefinition( int $typeId, @@ -103,14 +103,14 @@ abstract public function updateFieldDefinition( ): void; /** - * Update a Content Type based on the given SPI Persistence Type Value Object. + * Update a content type based on the given SPI Persistence Type Value Object. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if at least one of the used languages does not exist */ abstract public function updateType(int $typeId, int $status, Type $type): void; /** - * Bulk-load an array with data about the given Content Types. + * Bulk-load an array with data about the given content types. * * @param int[] $typeIds */ @@ -130,14 +130,14 @@ abstract public function loadTypeDataByRemoteId(string $remoteId, int $status): abstract public function countInstancesOfType(int $typeId): int; /** - * Permanently delete a Content Type of the given status. + * Permanently delete a content type of the given status. */ abstract public function delete(int $typeId, int $status): void; abstract public function deleteFieldDefinitionsForType(int $typeId, int $status): void; /** - * Delete a Content Type. + * Delete a content type. * * Does not delete Field Definitions! */ @@ -146,7 +146,7 @@ abstract public function deleteType(int $typeId, int $status): void; abstract public function deleteGroupAssignmentsForType(int $typeId, int $status): void; /** - * Publish a Content Type including its Field Definitions. + * Publish a content type including its Field Definitions. */ abstract public function publishTypeAndFields( int $typeId, diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php index cf6224c124..83b40160f6 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php @@ -26,9 +26,9 @@ use function sprintf; /** - * Content Type gateway implementation using the Doctrine database. + * Content type gateway implementation using the Doctrine database. * - * @internal Gateway implementation is considered internal. Use Persistence Content Type Handler instead. + * @internal Gateway implementation is considered internal. Use Persistence content type Handler instead. * * @see \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ @@ -384,7 +384,7 @@ public function insertType(Type $type, ?int $typeId = null): int } /** - * Get a map of Content Type storage column name to its value and parameter type. + * 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. */ @@ -877,7 +877,7 @@ private function updateFieldDefinitionMultilingualData( } /** - * Delete entire name data for the given Content Type of the given status. + * Delete entire name data for the given content type of the given status. */ private function deleteTypeNameData(int $typeId, int $typeStatus): void { diff --git a/src/lib/Persistence/Legacy/Content/Type/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Handler.php index b4e88b15f4..af6b85e3b3 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Handler.php @@ -34,7 +34,7 @@ class Handler implements BaseContentTypeHandler protected $mapper; /** - * Content Type update handler. + * Content type update handler. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler */ diff --git a/src/lib/Persistence/Legacy/Content/Type/Mapper.php b/src/lib/Persistence/Legacy/Content/Type/Mapper.php index 080bf961ba..af8c060d95 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Type/Mapper.php @@ -18,7 +18,7 @@ use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; /** - * Mapper for Content Type Handler. + * Mapper for content type Handler. * * Performs mapping of Type objects. */ diff --git a/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php index f2df666fca..82b5a1053e 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php @@ -18,17 +18,17 @@ abstract class Handler { /** - * Update existing Content items from one version of a Content Type to another one. + * Update existing Content items from one version of a content type to another one. */ abstract public function updateContentObjects(Type $fromType, Type $toType): void; /** - * Delete old version of a Content Type and all of its Field Definitions. + * Delete old version of a content type and all of its Field Definitions. */ abstract public function deleteOldType(Type $fromType): void; /** - * Change Content Type status. + * Change content type status. */ abstract public function publishNewType(Type $toType, int $newStatus): void; } diff --git a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php index 891c3e8ee0..4f016df335 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php @@ -22,7 +22,7 @@ class TypeGroupNotFound extends NotFoundException public function __construct($typeGroupId) { parent::__construct( - 'Persistence Content type group', + 'Persistence content type group', sprintf('ID: %s', $typeGroupId) ); } diff --git a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php index fa36d58553..58ce696196 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php @@ -22,7 +22,7 @@ class TypeNotFound extends NotFoundException public function __construct($typeId, $status) { parent::__construct( - 'Persistence Content type', + 'Persistence content type', sprintf('ID: %s, Status: %s', $typeId, $status) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php index 0437472bbb..0341ca76b8 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php @@ -14,7 +14,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway as ContentTypeGateway; /** - * Content Type Criterion visitor query builder base. + * Content type Criterion visitor query builder base. * * @internal for internal use by Repository Filtering */ 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 4f7ac9a874..762ce33852 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php @@ -15,7 +15,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway as ContentTypeGateway; /** - * Content Type Group ID Criterion visitor query builder. + * Content type Group ID Criterion visitor query builder. * * @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeGroupId * 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 baa50ed416..c90fcb0082 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php @@ -14,7 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; /** - * Content Type ID Criterion visitor query builder. + * Content type ID Criterion visitor query builder. * * @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeId * 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 f4e3f55ae0..3f5349e4b8 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php @@ -14,7 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; /** - * Content Type Identifier Criterion visitor query builder. + * Content type Identifier Criterion visitor query builder. * * @see \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier * diff --git a/src/lib/Repository/ContentTypeService.php b/src/lib/Repository/ContentTypeService.php index 5aa91a684c..39dc290a4d 100644 --- a/src/lib/Repository/ContentTypeService.php +++ b/src/lib/Repository/ContentTypeService.php @@ -310,7 +310,7 @@ public function deleteContentTypeGroup(APIContentTypeGroup $contentTypeGroup): v $this->repository->rollback(); throw new InvalidArgumentException( '$contentTypeGroup', - 'Content type group contains Content types', + 'Content type group contains content types', $e ); } catch (Exception $e) { @@ -490,7 +490,7 @@ protected function validateInputContentTypeGroups(array $contentTypeGroups): voi if (empty($contentTypeGroups)) { throw new InvalidArgumentException( '$contentTypeGroups', - 'The argument must contain at least one Content type group' + 'The argument must contain at least one content type group' ); } @@ -678,7 +678,7 @@ public function createContentType(APIContentTypeCreateStruct $contentTypeCreateS throw new InvalidArgumentException( '$contentTypeCreateStruct', - "Another Content type with identifier '{$contentTypeCreateStruct->identifier}' exists" + "Another content type with identifier '{$contentTypeCreateStruct->identifier}' exists" ); } catch (APINotFoundException $e) { // Do nothing @@ -692,7 +692,7 @@ public function createContentType(APIContentTypeCreateStruct $contentTypeCreateS throw new InvalidArgumentException( '$contentTypeCreateStruct', - "Another Content type with remoteId '{$contentTypeCreateStruct->remoteId}' exists" + "Another content type with remoteId '{$contentTypeCreateStruct->remoteId}' exists" ); } catch (APINotFoundException $e) { // Do nothing @@ -734,7 +734,7 @@ public function createContentType(APIContentTypeCreateStruct $contentTypeCreateS if ($fieldType->isSingular() && isset($fieldTypeIdentifierSet[$fieldDefinitionCreateStruct->fieldTypeIdentifier])) { throw new ContentTypeValidationException( - "Field Type '%identifier%' is singular and cannot be used more than once in a Content type", + "Field Type '%identifier%' is singular and cannot be used more than once in a content type", ['%identifier%' => $fieldDefinitionCreateStruct->fieldTypeIdentifier] ); } @@ -911,7 +911,7 @@ public function loadContentTypeDraft(int $contentTypeId, bool $ignoreOwnership = ); if (!$ignoreOwnership && $spiContentType->modifierId != $this->permissionResolver->getCurrentUserReference()->getUserId()) { - throw new NotFoundException('The Content type is owned by someone else', $contentTypeId); + throw new NotFoundException('The content type is owned by someone else', $contentTypeId); } return $this->contentTypeDomainMapper->buildContentTypeDraftDomainObject($spiContentType); @@ -984,7 +984,7 @@ public function createContentTypeDraft(APIContentType $contentType): APIContentT throw new BadStateException( '$contentType', - 'Draft of the Content type already exists' + 'Draft of the content type already exists' ); } catch (APINotFoundException $e) { $this->repository->beginTransaction(); @@ -1026,7 +1026,7 @@ public function updateContentTypeDraft(APIContentTypeDraft $contentTypeDraft, Co } catch (APINotFoundException $e) { throw new InvalidArgumentException( '$contentTypeDraft', - 'There is no Content type draft assigned to the authenticated user', + 'There is no content type draft assigned to the authenticated user', $e ); } @@ -1038,7 +1038,7 @@ public function updateContentTypeDraft(APIContentTypeDraft $contentTypeDraft, Co throw new InvalidArgumentException( '$contentTypeUpdateStruct', - "Another Content type with identifier '{$contentTypeUpdateStruct->identifier}' exists" + "Another content type with identifier '{$contentTypeUpdateStruct->identifier}' exists" ); } catch (APINotFoundException $e) { // Do nothing @@ -1052,7 +1052,7 @@ public function updateContentTypeDraft(APIContentTypeDraft $contentTypeDraft, Co throw new InvalidArgumentException( '$contentTypeUpdateStruct', - "Another Content type with remoteId '{$contentTypeUpdateStruct->remoteId}' exists" + "Another content type with remoteId '{$contentTypeUpdateStruct->remoteId}' exists" ); } catch (APINotFoundException $e) { // Do nothing @@ -1182,7 +1182,7 @@ public function assignContentTypeGroup(APIContentType $contentType, APIContentTy if (in_array($contentTypeGroup->id, $spiContentType->groupIds)) { throw new InvalidArgumentException( '$contentTypeGroup', - 'The provided Content type is already assigned to the Content type group' + 'The provided content type is already assigned to the content type group' ); } @@ -1224,7 +1224,7 @@ public function unassignContentTypeGroup(APIContentType $contentType, APIContent if (!in_array($contentTypeGroup->id, $spiContentType->groupIds)) { throw new InvalidArgumentException( '$contentTypeGroup', - 'The provided Content type is not assigned the Content type group' + 'The provided content type is not assigned the content type group' ); } @@ -1240,7 +1240,7 @@ public function unassignContentTypeGroup(APIContentType $contentType, APIContent $this->repository->rollback(); throw new BadStateException( '$contentType', - 'The provided Content type group is the last group assigned to the Content type', + 'The provided content type group is the last group assigned to the content type', $e ); } catch (Exception $e) { @@ -1278,7 +1278,7 @@ public function addFieldDefinition(APIContentTypeDraft $contentTypeDraft, FieldD if ($loadedContentTypeDraft->hasFieldDefinition($fieldDefinitionCreateStruct->identifier)) { throw new InvalidArgumentException( '$fieldDefinitionCreateStruct', - "Another Field definition with identifier '{$fieldDefinitionCreateStruct->identifier}' exists in the Content type" + "Another Field definition with identifier '{$fieldDefinitionCreateStruct->identifier}' exists in the content type" ); } //Fill default translations with default value for mainLanguageCode with fallback if no exist @@ -1307,7 +1307,7 @@ public function addFieldDefinition(APIContentTypeDraft $contentTypeDraft, FieldD if ($loadedContentTypeDraft->hasFieldDefinitionOfType($fieldDefinitionCreateStruct->fieldTypeIdentifier)) { throw new BadStateException( '$contentTypeDraft', - "The Content type already contains a Field definition of the singular Field Type '{$fieldDefinitionCreateStruct->fieldTypeIdentifier}'" + "The content type already contains a Field definition of the singular Field Type '{$fieldDefinitionCreateStruct->fieldTypeIdentifier}'" ); } } @@ -1316,7 +1316,7 @@ public function addFieldDefinition(APIContentTypeDraft $contentTypeDraft, FieldD ) { throw new BadStateException( '$contentTypeDraft', - "A Field definition of the '{$fieldDefinitionCreateStruct->fieldTypeIdentifier}' Field Type cannot be added because the Content type already has Content items" + "A Field definition of the '{$fieldDefinitionCreateStruct->fieldTypeIdentifier}' Field Type cannot be added because the content type already has Content items" ); } @@ -1364,7 +1364,7 @@ public function removeFieldDefinition(APIContentTypeDraft $contentTypeDraft, API if (empty($loadedFieldDefinition) || $loadedFieldDefinition->id != $fieldDefinition->id) { throw new InvalidArgumentException( '$fieldDefinition', - 'The given Field definition does not belong to the Content type' + 'The given Field definition does not belong to the content type' ); } @@ -1410,14 +1410,14 @@ public function updateFieldDefinition(APIContentTypeDraft $contentTypeDraft, API } elseif ($existingFieldDefinition->identifier == $fieldDefinitionUpdateStruct->identifier) { throw new InvalidArgumentException( '$fieldDefinitionUpdateStruct', - "Another Field definition with identifier '{$fieldDefinitionUpdateStruct->identifier}' exists in the Content type" + "Another Field definition with identifier '{$fieldDefinitionUpdateStruct->identifier}' exists in the content type" ); } } if (!$foundFieldId) { throw new InvalidArgumentException( '$fieldDefinition', - 'The given Field definition does not belong to the Content type' + 'The given Field definition does not belong to the content type' ); } @@ -1463,7 +1463,7 @@ public function publishContentTypeDraft(APIContentTypeDraft $contentTypeDraft): } catch (APINotFoundException $e) { throw new BadStateException( '$contentTypeDraft', - 'The Content type does not have a draft.', + 'The content type does not have a draft.', $e ); } @@ -1471,7 +1471,7 @@ public function publishContentTypeDraft(APIContentTypeDraft $contentTypeDraft): if ($loadedContentTypeDraft->getFieldDefinitions()->isEmpty()) { throw new InvalidArgumentException( '$contentTypeDraft', - 'The Content type draft should have at least one Field definition.' + 'The content type draft should have at least one Field definition.' ); } diff --git a/src/lib/Repository/Helper/NameSchemaService.php b/src/lib/Repository/Helper/NameSchemaService.php index 470def1f37..111edb167c 100644 --- a/src/lib/Repository/Helper/NameSchemaService.php +++ b/src/lib/Repository/Helper/NameSchemaService.php @@ -173,7 +173,7 @@ protected function getFieldTitles(array $schemaIdentifiers, $contentType, array } elseif ($contentType instanceof ContentType) { $fieldDefinition = $contentType->getFieldDefinition($fieldDefinitionIdentifier); } else { - throw new InvalidArgumentType('$contentType', 'API or SPI variant of a Content type'); + throw new InvalidArgumentType('$contentType', 'API or SPI variant of a content type'); } $fieldTypeService = $this->fieldTypeRegistry->getFieldType( $fieldDefinition->fieldTypeIdentifier diff --git a/src/lib/Repository/Mapper/ContentMapper.php b/src/lib/Repository/Mapper/ContentMapper.php index 080a857df7..6ca673191d 100644 --- a/src/lib/Repository/Mapper/ContentMapper.php +++ b/src/lib/Repository/Mapper/ContentMapper.php @@ -58,7 +58,7 @@ public function mapFieldsForCreate(ContentCreateStruct $contentCreateStruct): ar if ($fieldDefinition === null) { throw new ContentValidationException( - "Field definition '%identifier%' does not exist in the given Content type", + "Field definition '%identifier%' does not exist in the given content type", ['%identifier%' => $field->fieldDefIdentifier] ); } @@ -140,7 +140,7 @@ public function mapFieldsForUpdate( if ($fieldDefinition === null) { throw new ContentValidationException( - "Field definition '%identifier%' does not exist in given Content type", + "Field definition '%identifier%' does not exist in given content type", ['%identifier%' => $field->fieldDefIdentifier] ); } @@ -293,7 +293,7 @@ public function getFieldsForUpdate(array $updatedFields, Content $content): arra if ($fieldDefinition === null) { throw new ContentValidationException( - "Field definition '%identifier%' does not exist in given Content type", + "Field definition '%identifier%' does not exist in given content type", ['%identifier%' => $updatedField->fieldDefIdentifier] ); } @@ -331,7 +331,7 @@ public function getFieldsForCreate(array $createdFields, ContentType $contentTyp if ($fieldDefinition === null) { throw new ContentValidationException( - "Field definition '%identifier%' does not exist in the given Content type", + "Field definition '%identifier%' does not exist in the given content type", ['%identifier%' => $createdField->fieldDefIdentifier] ); } diff --git a/src/lib/Repository/Repository.php b/src/lib/Repository/Repository.php index 1b087379ac..d97c929160 100644 --- a/src/lib/Repository/Repository.php +++ b/src/lib/Repository/Repository.php @@ -395,9 +395,9 @@ public function getContentLanguageService(): LanguageServiceInterface } /** - * Get Content Type Service. + * Get content type Service. * - * Get service object to perform operations on Content Type objects and it's aggregate members. + * Get service object to perform operations on content type objects and it's aggregate members. * ( Group, Field & FieldCategory ) * * @return \Ibexa\Contracts\Core\Repository\ContentTypeService diff --git a/src/lib/Repository/UserService.php b/src/lib/Repository/UserService.php index 1a06e9f38e..949d3aaade 100644 --- a/src/lib/Repository/UserService.php +++ b/src/lib/Repository/UserService.php @@ -1130,7 +1130,7 @@ public function isUserGroup(APIContent $content): bool * @param string $email the email of the new user * @param string $password the plain password of the new user * @param string $mainLanguageCode the main language for the underlying content object - * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType Content Type for the underlying content object. + * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null $contentType content type for the underlying content object. * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserCreateStruct */ 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 3ddedf3651..c1c9504f42 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -22,7 +22,7 @@ class ContentTypeIdentifier extends CriterionHandler { /** - * Content Type handler. + * Content type handler. * * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ 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 7be506652d..67cc3f2c67 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php @@ -20,7 +20,7 @@ abstract class FieldBase extends CriterionHandler { /** - * Content Type handler. + * Content type handler. * * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ 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 53c0402607..8e231d518c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php @@ -29,7 +29,7 @@ class Field extends SortClauseHandler protected $languageHandler; /** - * Content Type handler. + * Content type handler. * * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 487e14d75b..29bec2d6fd 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -30,7 +30,7 @@ class DoctrineDatabase extends Gateway protected $connection; /** - * SPI Content Type Handler. + * SPI Content type Handler. * * Need this for being able to pick fields that are searchable. * diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index 03714237ae..ccad7d3862 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -841,7 +841,7 @@ protected function createLanguageIfNotExists( } /** - * @param string $identifier Content Type identifier + * @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 bool $alwaysAvailable default always available diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index 5b910635ab..681039bfc5 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -1918,7 +1918,7 @@ public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() /** * Test for the publishVersion() method, and that it creates limited archives. * - * @todo Adapt this when per content type archive limited is added on repository Content Type model. + * @todo Adapt this when per content type archive limited is added on repository content type model. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() * @depends testPublishVersionFromContentDraft @@ -2170,7 +2170,7 @@ public function testUpdateContentMainTranslation(): void $contentService = $repository->getContentService(); $locationService = $repository->getLocationService(); - // create a Content Type which is not always available by default + // create a content type which is not always available by default $contentType = $this->createSimpleContentType( 'test_t', self::ENG_GB, @@ -6428,7 +6428,7 @@ public function testCopyTranslationsFromInvalidPublishedContentToDraft() // Create content type for testing $contentTypeCreateStruct = $contentTypeService->newContentTypeCreateStruct('test_copy_translation'); $contentTypeCreateStruct->mainLanguageCode = 'eng-US'; - $contentTypeCreateStruct->names = ['eng-US' => 'Test Content type for Copy Translations']; + $contentTypeCreateStruct->names = ['eng-US' => 'Test content type for Copy Translations']; $fieldDefinition = $contentTypeService->newFieldDefinitionCreateStruct('name', 'ezstring'); $fieldDefinition->position = 1; $contentTypeCreateStruct->addFieldDefinition($fieldDefinition); diff --git a/tests/integration/Core/Repository/ContentTypeServiceTest.php b/tests/integration/Core/Repository/ContentTypeServiceTest.php index 174ac06f96..513d5a9d90 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceTest.php @@ -1013,7 +1013,7 @@ protected function assertContentTypeGroupsCorrect($expectedGroups, $actualGroups public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIdentifier() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$contentTypeCreateStruct\' is invalid: Another Content type with identifier \'folder\' exists'); + $this->expectExceptionMessage('Argument \'$contentTypeCreateStruct\' is invalid: Another content type with identifier \'folder\' exists'); $repository = $this->getRepository(); @@ -1038,7 +1038,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIden } /** - * Test for the createContentType() method trying to create Content Type with already existing + * Test for the createContentType() method trying to create content type with already existing * remoteId. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentType() @@ -1047,7 +1047,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIden public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateRemoteId() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Another Content type with remoteId \'a3d405b81be900468eb153d774f4f0d2\' exists'); + $this->expectExceptionMessage('Another content type with remoteId \'a3d405b81be900468eb153d774f4f0d2\' exists'); $repository = $this->getRepository(); @@ -1118,7 +1118,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateFiel public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateContentTypeIdentifier() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Another Content type with identifier \'blog-post\' exists'); + $this->expectExceptionMessage('Another content type with identifier \'blog-post\' exists'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1214,7 +1214,7 @@ public function testCreateContentTypeThrowsContentTypeFieldDefinitionValidationE public function testCreateContentTypeThrowsInvalidArgumentExceptionGroupsEmpty() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$contentTypeGroups\' is invalid: The argument must contain at least one Content type group'); + $this->expectExceptionMessage('Argument \'$contentTypeGroups\' is invalid: The argument must contain at least one content type group'); $repository = $this->getRepository(); @@ -1551,7 +1551,7 @@ public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicat public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftForAuthenticatedUser() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: There is no Content type draft assigned to the authenticated user'); + $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: There is no content type draft assigned to the authenticated user'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1560,7 +1560,7 @@ public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftF $contentTypeDraft = $this->createContentTypeDraft(); $typeUpdate = $contentTypeService->newContentTypeUpdateStruct(); - // create Role allowing Content Type updates + // create Role allowing content type updates $roleCreateStruct = $roleService->newRoleCreateStruct('ContentTypeUpdaters'); $policyCreateStruct = $roleService->newPolicyCreateStruct('class', 'update'); $roleDraft = $roleService->createRole($roleCreateStruct); @@ -1755,7 +1755,7 @@ public function testAddFieldDefinitionThrowsContentTypeFieldDefinitionValidation public function testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField() { $this->expectException(BadStateException::class); - $this->expectExceptionMessage('The Content type already contains a Field definition of the singular Field Type \'ezuser\''); + $this->expectExceptionMessage('The content type already contains a Field definition of the singular Field Type \'ezuser\''); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1796,7 +1796,7 @@ public function testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField( public function testCreateContentThrowsContentTypeValidationException() { $this->expectException(ContentTypeValidationException::class); - $this->expectExceptionMessage('Field Type \'ezuser\' is singular and cannot be used more than once in a Content type'); + $this->expectExceptionMessage('Field Type \'ezuser\' is singular and cannot be used more than once in a content type'); $repository = $this->getRepository(); @@ -1850,7 +1850,7 @@ public function testCreateContentThrowsContentTypeValidationException() public function testAddFieldDefinitionThrowsBadStateExceptionContentInstances() { $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'); + $this->expectExceptionMessage('A Field definition of the \'ezuser\' Field Type cannot be added because the content type already has Content items'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2508,7 +2508,7 @@ public function testUpdateFieldDefinitionWithEmptyStruct() public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIdentifierExists() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$fieldDefinitionUpdateStruct\' is invalid: Another Field definition with identifier \'title\' exists in the Content type'); + $this->expectExceptionMessage('Argument \'$fieldDefinitionUpdateStruct\' is invalid: Another Field definition with identifier \'title\' exists in the content type'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2540,7 +2540,7 @@ public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIden public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionForUndefinedField() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$fieldDefinition\' is invalid: The given Field definition does not belong to the Content type'); + $this->expectExceptionMessage('Argument \'$fieldDefinition\' is invalid: The given Field definition does not belong to the content type'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2631,7 +2631,7 @@ public function testPublishContentTypeDraftSetsNameSchema() } /** - * Test that publishing Content Type Draft refreshes list of Content Types in Content Type Groups. + * Test that publishing content type Draft refreshes list of content types in content type Groups. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::publishContentTypeDraft */ @@ -2650,7 +2650,7 @@ public function testPublishContentTypeDraftRefreshesContentTypesList() $contentTypeGroups = $contentTypeDraft->getContentTypeGroups(); foreach ($contentTypeGroups as $contentTypeGroup) { $contentTypes = $contentTypeService->loadContentTypes($contentTypeGroup); - // check if not published Content Type does not exist on published Content Types list + // check if not published content type does not exist on published content types list self::assertNotContains( $contentTypeDraft->id, array_map( @@ -2671,7 +2671,7 @@ static function (ContentType $contentType) { foreach ($contentTypeGroups as $contentTypeGroup) { $contentTypes = $contentTypeService->loadContentTypes($contentTypeGroup); - // check if published Content is available in published Content Types list + // check if published Content is available in published content types list self::assertContains( $contentTypeDraft->id, array_map( @@ -2708,7 +2708,7 @@ public function testPublishContentTypeDraftThrowsBadStateException() } /** - * Test for the createContentTypeGroup() method trying to create Content Type without any fields. + * Test for the createContentTypeGroup() method trying to create content type without any fields. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::publishContentTypeDraft() * @depends testPublishContentTypeDraft @@ -2716,7 +2716,7 @@ public function testPublishContentTypeDraftThrowsBadStateException() public function testPublishContentTypeDraftThrowsInvalidArgumentExceptionWithoutFields() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: The Content type draft should have at least one Field definition'); + $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: The content type draft should have at least one Field definition'); $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2737,7 +2737,7 @@ public function testPublishContentTypeDraftThrowsInvalidArgumentExceptionWithout $contentTypeService->loadContentTypeGroupByIdentifier('Content'), ] ); - // Throws an exception because Content Type draft should have at least one field definition. + // Throws an exception because content type draft should have at least one field definition. $contentTypeService->publishContentTypeDraft($contentTypeDraft); } @@ -3563,7 +3563,7 @@ public function testAssignContentTypeGroup() } $this->fail( sprintf( - 'Group with ID "%s" not assigned to Content type.', + 'Group with ID "%s" not assigned to content type.', $mediaGroup->id ) ); diff --git a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php index 5fbd467dbc..8e3af2ead9 100644 --- a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php @@ -321,7 +321,7 @@ protected function createContentType($fieldSettings, $validatorConfiguration, ar try { return $contentTypeService->loadContentTypeByIdentifier($contentTypeIdentifier); } catch (NotFoundException $e) { - // Move on to creating Content Type + // Move on to creating content type } $createStruct = $contentTypeService->newContentTypeCreateStruct( diff --git a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php index e8995f502a..7a5f0997e9 100644 --- a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php @@ -123,7 +123,7 @@ protected function checkOperatorSupport($operator): void } /** - * Proxy method for creating test Content type. + * Proxy method for creating test content type. * * Defaults to the testCreateContentType() in the base field type test, * override in the concrete test as needed. diff --git a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php index 27d36e1d44..9807765353 100644 --- a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php +++ b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php @@ -317,7 +317,7 @@ public function getUserLimitationData(): iterable { $repository = $this->getRepository(false); - // Content Type Limitations + // Content type Limitations $contentTypeService = $repository->getContentTypeService(); $articleType = $contentTypeService->loadContentTypeByIdentifier('article'); $folderType = $contentTypeService->loadContentTypeByIdentifier('folder'); diff --git a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php index 6a6332f426..f6fcb51f43 100644 --- a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php @@ -67,7 +67,7 @@ private function createTestContentType() $createStruct = $contentTypeService->newContentTypeCreateStruct('test_content_type'); $createStruct->mainLanguageCode = $languageCode; - $createStruct->names = [$languageCode => 'Test Content type']; + $createStruct->names = [$languageCode => 'Test content type']; $createStruct->nameSchema = ''; $createStruct->urlAliasSchema = ''; diff --git a/tests/integration/Core/Repository/SearchEngineIndexingTest.php b/tests/integration/Core/Repository/SearchEngineIndexingTest.php index 6f01f868b9..fc71962f8b 100644 --- a/tests/integration/Core/Repository/SearchEngineIndexingTest.php +++ b/tests/integration/Core/Repository/SearchEngineIndexingTest.php @@ -1189,7 +1189,7 @@ protected function createTestContentType( $contentTypeStruct->mainLanguageCode = 'eng-GB'; $contentTypeStruct->creatorId = 14; $contentTypeStruct->creationDate = new DateTime(); - $contentTypeStruct->names = ['eng-GB' => 'Test Content type']; + $contentTypeStruct->names = ['eng-GB' => 'Test content type']; $contentTypeStruct->addFieldDefinition($nameField); $contentTypeGroup = $contentTypeService->loadContentTypeGroupByIdentifier('Content'); diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 716456dfe0..c4284521f2 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -1189,7 +1189,7 @@ public function testRefreshSystemUrlAliasesForLocationWithChangedSlugConverterCo } /** - * Test that URL aliases are refreshed after changing URL alias schema Field name of a Content Type. + * Test that URL aliases are refreshed after changing URL alias schema Field name of a content type. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException @@ -1632,7 +1632,7 @@ protected function changeSlugConverterConfiguration($key, $value) } /** - * Update Content Type URL alias schema pattern. + * Update content type URL alias schema pattern. * * @param string $contentTypeIdentifier * @param string $newUrlAliasSchema diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index 8e8f06c2a8..d1d02f8fdd 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -3287,7 +3287,7 @@ private function createTestUserWithPassword(string $password, ContentType $conte } /** - * Creates the User Content Type with password constraints. + * Creates the User content type with password constraints. * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ diff --git a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php index fdbae101aa..1e68bbbbe0 100644 --- a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php @@ -1613,7 +1613,7 @@ protected function getLocationGatewayMock() } /** - * Returns a Content Type gateway mock. + * Returns a content type gateway mock. * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ 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 909250a42a..74bb0971ee 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php @@ -18,7 +18,7 @@ use ReflectionObject; /** - * Test case for Content type Updater. + * Test case for content type Updater. */ class AddFieldTest extends TestCase { diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php index 2dbcb6bf92..d84625b782 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php @@ -33,7 +33,7 @@ public function getFilteringCriteriaQueryData(): iterable ['dcValue1' => [3]], ]; - yield 'Content type Identifier=folder OR Content type ID IN (1, 2)' => [ + yield 'Content type Identifier=folder OR content type ID IN (1, 2)' => [ new Criterion\LogicalOr( [ new Criterion\ContentTypeIdentifier('folder'), diff --git a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php index e863dbf3b8..57d94ddbf3 100644 --- a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php @@ -153,7 +153,7 @@ protected function getConnectionMock(): Connection } /** - * Returns a mock object for the Content type Handler. + * Returns a mock object for the content type Handler. * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler|\PHPUnit\Framework\MockObject\MockObject */ diff --git a/tests/lib/Repository/Service/Mock/ContentTest.php b/tests/lib/Repository/Service/Mock/ContentTest.php index a5322c3454..5f10cdb39d 100644 --- a/tests/lib/Repository/Service/Mock/ContentTest.php +++ b/tests/lib/Repository/Service/Mock/ContentTest.php @@ -2097,7 +2097,7 @@ public function providerForTestCreateContentThrowsContentValidationExceptionFiel public function testCreateContentThrowsContentValidationExceptionFieldDefinition($mainLanguageCode, $structFields) { $this->expectException(ContentValidationException::class); - $this->expectExceptionMessage('Field definition \'identifier\' does not exist in the given Content type'); + $this->expectExceptionMessage('Field definition \'identifier\' does not exist in the given content type'); $this->assertForCreateContentContentValidationException( $mainLanguageCode, @@ -5098,7 +5098,7 @@ public function providerForTestUpdateContentThrowsContentValidationExceptionFiel public function testUpdateContentThrowsContentValidationExceptionFieldDefinition($initialLanguageCode, $structFields) { $this->expectException(ContentValidationException::class); - $this->expectExceptionMessage('Field definition \'identifier\' does not exist in given Content type'); + $this->expectExceptionMessage('Field definition \'identifier\' does not exist in given content type'); $this->assertForUpdateContentContentValidationException( $initialLanguageCode, @@ -5965,7 +5965,7 @@ public function testCopyContentWithRollback() /** * Reusable method for setting exceptions on buildContentDomainObject usage. * - * Plain usage as in when Content type is loaded directly. + * Plain usage as in when content type is loaded directly. * * @param \Ibexa\Contracts\Core\Persistence\Content $spiContent * @param array $translations