Skip to content

Commit

Permalink
Changed Content type to content type
Browse files Browse the repository at this point in the history
  • Loading branch information
Gengar-i committed Jan 9, 2024
1 parent d154664 commit 0f11586
Show file tree
Hide file tree
Showing 58 changed files with 194 additions and 192 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Core/Command/CleanupVersionsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<<<EOT
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Core/Command/ExpireUserPasswordsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function configure(): void
'user-content-type-identifier',
'ct',
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
'Expire passwords of all users based on specific Content type'
'Expire passwords of all users based on specific content type'
)
->addOption(
'force',
Expand All @@ -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(
Expand Down Expand Up @@ -271,7 +271,7 @@ private function supplySearchCriteria(
if (!empty($userContentTypeIdentifiers)) {
$output->writeln(
sprintf(
"<info>\tUser Content type Identifier: %s</info>",
"<info>\tUser content type Identifier: %s</info>",
implode(', ', $userContentTypeIdentifiers)
)
);
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Core/Command/ResizeOriginalImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -150,7 +150,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if (!$fieldType || $fieldType->fieldTypeIdentifier !== 'ezimage') {
$output->writeln(
sprintf(
"<error>Field Type with identifier '%s' in Content type '%s' must be 'ezimage', you provided '%s'.</error>",
"<error>Field Type with identifier '%s' in content type '%s' must be 'ezimage', you provided '%s'.</error>",
$imageFieldIdentifier,
$contentType->identifier,
$fieldType ? $fieldType->fieldTypeIdentifier : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
36 changes: 18 additions & 18 deletions src/bundle/Core/Features/Context/ContentTypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use PHPUnit\Framework\Assert as Assertion;

/**
* Sentences for Content types.
* Sentences for content types.
*/
class ContentTypeContext implements Context
{
Expand All @@ -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,
Expand All @@ -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)
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
*
Expand Down
12 changes: 6 additions & 6 deletions src/bundle/Core/Features/Context/FieldTypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Limitation/Target/Builder/VersionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Persistence/Content/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Relation extends ValueObject
public $sourceContentVersionNo;

/**
* Source Content Type Field Definition Id.
* Source content type Field Definition Id.
*
* @var mixed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CreateStruct extends ValueObject
public $sourceContentVersionNo;

/**
* Source Content Type Field Definition Id.
* Source content type Field Definition Id.
*
* @var mixed
*/
Expand Down
6 changes: 3 additions & 3 deletions src/contracts/Persistence/Content/Type/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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_<originalBaseIdentifier>_<newTypeId>' or another unique string.
*
* @param mixed $userId
Expand Down
Loading

0 comments on commit 0f11586

Please sign in to comment.