From e0b18ef9a5fdaff8c7225c648acecc6eee1c0fc1 Mon Sep 17 00:00:00 2001
From: Robert Swoboda <53216935+Gengar-i@users.noreply.github.com>
Date: Mon, 8 Jan 2024 13:51:15 +0100
Subject: [PATCH] Changed Content type to content type
---
.../config/value_object_visitors.yml | 2 +-
.../ibexa_repository_exceptions.en.xliff | 32 +++++++++----------
src/contracts/Input/ParsingDispatcher.php | 4 +--
src/lib/Input/Dispatcher.php | 2 +-
src/lib/Input/ParserTools.php | 2 +-
src/lib/Server/Controller/ContentType.php | 10 +++---
src/lib/Server/Input/Parser/ContentCreate.php | 2 +-
src/lib/Server/Input/Parser/UserCreate.php | 2 +-
.../Server/Input/Parser/UserGroupCreate.php | 2 +-
.../RestContentTypeBase.php | 2 +-
src/lib/Server/Values/RestContentType.php | 2 +-
tests/bundle/Functional/BinaryContentTest.php | 2 +-
tests/bundle/Functional/ContentTest.php | 2 +-
.../Server/Input/Parser/ContentCreateTest.php | 2 +-
.../Server/Input/Parser/UserCreateTest.php | 2 +-
.../Input/Parser/UserGroupCreateTest.php | 2 +-
16 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/bundle/Resources/config/value_object_visitors.yml b/src/bundle/Resources/config/value_object_visitors.yml
index 6609346b..0ce2c6a6 100644
--- a/src/bundle/Resources/config/value_object_visitors.yml
+++ b/src/bundle/Resources/config/value_object_visitors.yml
@@ -30,7 +30,7 @@ parameters:
# Field Definition
- # Content Type Group
+ # Content type Group
# HTTP
diff --git a/src/bundle/Resources/translations/ibexa_repository_exceptions.en.xliff b/src/bundle/Resources/translations/ibexa_repository_exceptions.en.xliff
index 22bb4a3d..ecacbe7a 100644
--- a/src/bundle/Resources/translations/ibexa_repository_exceptions.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_repository_exceptions.en.xliff
@@ -6,25 +6,25 @@
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
-
-
- Cannot publish an empty Content type draft
- key: Cannot publish an empty Content type draft
+
+
+ Cannot publish an empty content type draft
+ key: Cannot publish an empty content type draft
-
-
- Cannot unlink the Content type from its only remaining group
- key: Cannot unlink the Content type from its only remaining group
+
+
+ Cannot unlink the content type from its only remaining group
+ key: Cannot unlink the content type from its only remaining groupCurrent version already has DRAFT statuskey: Current version already has DRAFT status
-
-
- Only empty Content type groups can be deleted
- key: Only empty Content type groups can be deleted
+
+
+ Only empty content type groups can be deleted
+ key: Only empty content type groups can be deleted
@@ -56,10 +56,10 @@
Relation of type COMMON to the selected destination content ID already existskey: Relation of type COMMON to the selected destination content ID already exists
-
-
- The Content type is already linked to the provided group
- key: The Content type is already linked to the provided group
+
+
+ The content type is already linked to the provided group
+ key: The content type is already linked to the provided group
diff --git a/src/contracts/Input/ParsingDispatcher.php b/src/contracts/Input/ParsingDispatcher.php
index a63be8fc..dd8f40a0 100644
--- a/src/contracts/Input/ParsingDispatcher.php
+++ b/src/contracts/Input/ParsingDispatcher.php
@@ -49,7 +49,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, array $pa
}
/**
- * Adds another parser for the given Content type.
+ * Adds another parser for the given content type.
*
* @param string $mediaType
* @param \Ibexa\Contracts\Rest\Input\Parser $parser
@@ -105,7 +105,7 @@ protected function internalParse(array $data, string $mediaType)
}
if (!isset($this->parsers[$mediaType][$version])) {
- throw new Exceptions\Parser("Unknown Content type specification: '$mediaType (version: $version)'.");
+ throw new Exceptions\Parser("Unknown content type specification: '$mediaType (version: $version)'.");
}
return $this->parsers[$mediaType][$version]->parse($data, $this);
diff --git a/src/lib/Input/Dispatcher.php b/src/lib/Input/Dispatcher.php
index 2bcd7c1f..308a6f6b 100644
--- a/src/lib/Input/Dispatcher.php
+++ b/src/lib/Input/Dispatcher.php
@@ -52,7 +52,7 @@ public function __construct(ParsingDispatcher $parsingDispatcher, array $handler
}
/**
- * Adds another handler for the given Content type.
+ * Adds another handler for the given content type.
*
* @param string $type
* @param \Ibexa\Contracts\Rest\Input\Handler $handler
diff --git a/src/lib/Input/ParserTools.php b/src/lib/Input/ParserTools.php
index b2082e39..216f8683 100644
--- a/src/lib/Input/ParserTools.php
+++ b/src/lib/Input/ParserTools.php
@@ -131,7 +131,7 @@ public function parseStatus($contentTypeStatus)
return Values\ContentType\ContentType::STATUS_MODIFIED;
}
- throw new \RuntimeException("Unknown Content type status '{$contentTypeStatus}.'");
+ throw new \RuntimeException("Unknown content type status '{$contentTypeStatus}.'");
}
/**
diff --git a/src/lib/Server/Controller/ContentType.php b/src/lib/Server/Controller/ContentType.php
index 816d01dd..7b9ab1f7 100644
--- a/src/lib/Server/Controller/ContentType.php
+++ b/src/lib/Server/Controller/ContentType.php
@@ -139,7 +139,7 @@ public function deleteContentTypeGroup($contentTypeGroupId)
$contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
if (!empty($contentTypes)) {
- throw new ForbiddenException('Only empty Content type groups can be deleted');
+ throw new ForbiddenException('Only empty content type groups can be deleted');
}
$this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);
@@ -740,7 +740,7 @@ public function publishContentTypeDraft($contentTypeId)
$fieldDefinitions = $contentTypeDraft->getFieldDefinitions();
if (empty($fieldDefinitions)) {
- throw new ForbiddenException('Cannot publish an empty Content type draft');
+ throw new ForbiddenException('Cannot publish an empty content type draft');
}
$this->contentTypeService->publishContentTypeDraft($contentTypeDraft);
@@ -843,7 +843,7 @@ public function linkContentTypeToGroup($contentTypeId, Request $request)
}
if ($contentTypeInGroup) {
- throw new ForbiddenException('The Content type is already linked to the provided group');
+ throw new ForbiddenException('The content type is already linked to the provided group');
}
$this->contentTypeService->assignContentTypeGroup(
@@ -885,11 +885,11 @@ public function unlinkContentTypeFromGroup($contentTypeId, $contentTypeGroupId)
}
if (!$contentTypeInGroup) {
- throw new Exceptions\NotFoundException('The Content type is not in the provided group');
+ throw new Exceptions\NotFoundException('The content type is not in the provided group');
}
if (count($existingContentTypeGroups) == 1) {
- throw new ForbiddenException('Cannot unlink the Content type from its only remaining group');
+ throw new ForbiddenException('Cannot unlink the content type from its only remaining group');
}
$this->contentTypeService->unassignContentTypeGroup(
diff --git a/src/lib/Server/Input/Parser/ContentCreate.php b/src/lib/Server/Input/Parser/ContentCreate.php
index f679405d..50b572c8 100644
--- a/src/lib/Server/Input/Parser/ContentCreate.php
+++ b/src/lib/Server/Input/Parser/ContentCreate.php
@@ -153,7 +153,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
- "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$contentType->identifier}' Content type in ContentCreate."
+ "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$contentType->identifier}' content type in ContentCreate."
);
}
diff --git a/src/lib/Server/Input/Parser/UserCreate.php b/src/lib/Server/Input/Parser/UserCreate.php
index 103aaf7a..50674c76 100644
--- a/src/lib/Server/Input/Parser/UserCreate.php
+++ b/src/lib/Server/Input/Parser/UserCreate.php
@@ -136,7 +136,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $userCreateStruct->contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
- "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userCreateStruct->contentType->identifier}' Content type in UserCreate."
+ "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userCreateStruct->contentType->identifier}' content type in UserCreate."
);
}
diff --git a/src/lib/Server/Input/Parser/UserGroupCreate.php b/src/lib/Server/Input/Parser/UserGroupCreate.php
index e3baedfb..c294c938 100644
--- a/src/lib/Server/Input/Parser/UserGroupCreate.php
+++ b/src/lib/Server/Input/Parser/UserGroupCreate.php
@@ -104,7 +104,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher)
$fieldDefinition = $userGroupCreateStruct->contentType->getFieldDefinition($fieldData['fieldDefinitionIdentifier']);
if (!$fieldDefinition) {
throw new Exceptions\Parser(
- "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userGroupCreateStruct->contentType->identifier}' Content type in UserGroupCreate."
+ "'{$fieldData['fieldDefinitionIdentifier']}' is an invalid Field definition identifier for the '{$userGroupCreateStruct->contentType->identifier}' content type in UserGroupCreate."
);
}
diff --git a/src/lib/Server/Output/ValueObjectVisitor/RestContentTypeBase.php b/src/lib/Server/Output/ValueObjectVisitor/RestContentTypeBase.php
index 10ed7aa6..c43d7261 100644
--- a/src/lib/Server/Output/ValueObjectVisitor/RestContentTypeBase.php
+++ b/src/lib/Server/Output/ValueObjectVisitor/RestContentTypeBase.php
@@ -55,7 +55,7 @@ protected function serializeStatus($contentTypeStatus)
return 'MODIFIED';
}
- throw new \RuntimeException("Unknown Content type status: '{$contentTypeStatus}'.");
+ throw new \RuntimeException("Unknown content type status: '{$contentTypeStatus}'.");
}
}
diff --git a/src/lib/Server/Values/RestContentType.php b/src/lib/Server/Values/RestContentType.php
index f2eaaaff..5a101de7 100644
--- a/src/lib/Server/Values/RestContentType.php
+++ b/src/lib/Server/Values/RestContentType.php
@@ -10,7 +10,7 @@
use Ibexa\Rest\Value as RestValue;
/**
- * REST Content type, as received by /content/types/.
+ * REST content type, as received by /content/types/.
*
* Might have a "FieldDefinitionList" embedded
*/
diff --git a/tests/bundle/Functional/BinaryContentTest.php b/tests/bundle/Functional/BinaryContentTest.php
index 0745f96c..1f38b97c 100644
--- a/tests/bundle/Functional/BinaryContentTest.php
+++ b/tests/bundle/Functional/BinaryContentTest.php
@@ -165,7 +165,7 @@ private function createContentTypeWithImageAsset()
image_asset_ct
- Image Asset Content type
+ Image Asset content typeimage_asset_ct<title>
diff --git a/tests/bundle/Functional/ContentTest.php b/tests/bundle/Functional/ContentTest.php
index 084af86b..ba0cc5e0 100644
--- a/tests/bundle/Functional/ContentTest.php
+++ b/tests/bundle/Functional/ContentTest.php
@@ -713,7 +713,7 @@ private function assertVersionResponseContainsExpectedFields(ResponseInterface $
/**
* Create new Content Draft.
*
- * @param string $restContentTypeHref Content type REST resource link
+ * @param string $restContentTypeHref content type REST resource link
* @param string $restParentLocationHref Parent Location REST resource link
* @param string $restSectionHref Section REST resource link
* @param string $restUserHref User REST resource link
diff --git a/tests/lib/Server/Input/Parser/ContentCreateTest.php b/tests/lib/Server/Input/Parser/ContentCreateTest.php
index a7a29574..bbd3ce3a 100644
--- a/tests/lib/Server/Input/Parser/ContentCreateTest.php
+++ b/tests/lib/Server/Input/Parser/ContentCreateTest.php
@@ -419,7 +419,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
- $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in ContentCreate.');
+ $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in ContentCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/13',
diff --git a/tests/lib/Server/Input/Parser/UserCreateTest.php b/tests/lib/Server/Input/Parser/UserCreateTest.php
index 88d34782..fede1784 100644
--- a/tests/lib/Server/Input/Parser/UserCreateTest.php
+++ b/tests/lib/Server/Input/Parser/UserCreateTest.php
@@ -361,7 +361,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
- $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in UserCreate.');
+ $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in UserCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/4',
diff --git a/tests/lib/Server/Input/Parser/UserGroupCreateTest.php b/tests/lib/Server/Input/Parser/UserGroupCreateTest.php
index 614ec956..88c70ad1 100644
--- a/tests/lib/Server/Input/Parser/UserGroupCreateTest.php
+++ b/tests/lib/Server/Input/Parser/UserGroupCreateTest.php
@@ -238,7 +238,7 @@ public function testParseExceptionOnMissingFieldDefinitionIdentifier()
public function testParseExceptionOnInvalidFieldDefinitionIdentifier()
{
$this->expectException(Parser::class);
- $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' Content type in UserGroupCreate.');
+ $this->expectExceptionMessage('\'unknown\' is an invalid Field definition identifier for the \'some_class\' content type in UserGroupCreate.');
$inputArray = [
'ContentType' => [
'_href' => '/content/types/3',