From 388e3fb8b8c5ca4ed053c3538bfd2b00b45e0119 Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Tue, 16 Jun 2026 13:19:40 -0400 Subject: [PATCH] refactor: object property names Signed-off-by: Sebastian Krupinski --- .../CollectionPropertiesBaseAbstract.php | 12 +++++------ .../CollectionPropertiesBaseInterface.php | 12 +++++------ .../CollectionPropertiesMutableAbstract.php | 10 +++++----- .../Entity/EntityPropertiesBaseAbstract.php | 2 +- .../Entity/EntityPropertiesBaseInterface.php | 2 +- .../EntityPropertiesMutableAbstract.php | 2 +- shared/lib/Files/Node/INodeBase.php | 20 +++++++++---------- shared/lib/Files/Node/INodeEntityBase.php | 8 ++++---- .../lib/Mail/Service/ServiceBaseInterface.php | 4 ++-- .../CollectionPropertiesBaseAbstract.php | 12 +++++------ .../CollectionPropertiesBaseInterface.php | 12 +++++------ .../CollectionPropertiesMutableAbstract.php | 10 +++++----- .../Entity/EntityPropertiesBaseAbstract.php | 2 +- .../Entity/EntityPropertiesBaseInterface.php | 2 +- .../EntityPropertiesMutableAbstract.php | 2 +- .../CollectionPropertiesBaseAbstract.php | 4 ++-- .../CollectionPropertiesBaseInterface.php | 4 ++-- .../CollectionPropertiesMutableAbstract.php | 2 +- .../Entity/EntityPropertiesBaseAbstract.php | 10 +++++----- .../Entity/EntityPropertiesBaseInterface.php | 10 +++++----- .../EntityPropertiesMutableAbstract.php | 8 ++++---- .../ResourceProviderBaseInterface.php | 8 ++++---- .../Provider/ResourceServiceBaseInterface.php | 18 ++++++++--------- 23 files changed, 88 insertions(+), 88 deletions(-) diff --git a/shared/lib/Chrono/Collection/CollectionPropertiesBaseAbstract.php b/shared/lib/Chrono/Collection/CollectionPropertiesBaseAbstract.php index 178503d..7799508 100644 --- a/shared/lib/Chrono/Collection/CollectionPropertiesBaseAbstract.php +++ b/shared/lib/Chrono/Collection/CollectionPropertiesBaseAbstract.php @@ -26,7 +26,7 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra * @inheritDoc */ public function content(): CollectionContent { - $content = $this->data[self::JSON_PROPERTY_CONTENTS] ?? null; + $content = $this->data[self::PROPERTY_CONTENTS] ?? null; if ($content instanceof CollectionContent) { return $content; } @@ -42,35 +42,35 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra * @inheritDoc */ public function getLabel(): string { - return $this->data[self::JSON_PROPERTY_LABEL] ?? ''; + return $this->data[self::PROPERTY_LABEL] ?? ''; } /** * @inheritDoc */ public function getDescription(): ?string { - return $this->data[self::JSON_PROPERTY_DESCRIPTION] ?? null; + return $this->data[self::PROPERTY_DESCRIPTION] ?? null; } /** * @inheritDoc */ public function getPriority(): ?int { - return $this->data[self::JSON_PROPERTY_PRIORITY] ?? null; + return $this->data[self::PROPERTY_PRIORITY] ?? null; } /** * @inheritDoc */ public function getVisibility(): ?bool { - return $this->data[self::JSON_PROPERTY_VISIBILITY] ?? null; + return $this->data[self::PROPERTY_VISIBILITY] ?? null; } /** * @inheritDoc */ public function getColor(): ?string { - return $this->data[self::JSON_PROPERTY_COLOR] ?? null; + return $this->data[self::PROPERTY_COLOR] ?? null; } } diff --git a/shared/lib/Chrono/Collection/CollectionPropertiesBaseInterface.php b/shared/lib/Chrono/Collection/CollectionPropertiesBaseInterface.php index eeb4ca6..2781935 100644 --- a/shared/lib/Chrono/Collection/CollectionPropertiesBaseInterface.php +++ b/shared/lib/Chrono/Collection/CollectionPropertiesBaseInterface.php @@ -14,13 +14,13 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; interface CollectionPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'chrono:collection'; - public const JSON_PROPERTY_CONTENTS = 'content'; + public const PROPERTY_CONTENTS = 'content'; - public const JSON_PROPERTY_LABEL = 'label'; - public const JSON_PROPERTY_DESCRIPTION = 'description'; - public const JSON_PROPERTY_PRIORITY = 'priority'; - public const JSON_PROPERTY_VISIBILITY = 'visibility'; - public const JSON_PROPERTY_COLOR = 'color'; + public const PROPERTY_LABEL = 'label'; + public const PROPERTY_DESCRIPTION = 'description'; + public const PROPERTY_PRIORITY = 'priority'; + public const PROPERTY_VISIBILITY = 'visibility'; + public const PROPERTY_COLOR = 'color'; public function content(): CollectionContent; diff --git a/shared/lib/Chrono/Collection/CollectionPropertiesMutableAbstract.php b/shared/lib/Chrono/Collection/CollectionPropertiesMutableAbstract.php index d3cfc23..88c1e2c 100644 --- a/shared/lib/Chrono/Collection/CollectionPropertiesMutableAbstract.php +++ b/shared/lib/Chrono/Collection/CollectionPropertiesMutableAbstract.php @@ -33,7 +33,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setLabel(string $value): static { - $this->data[self::JSON_PROPERTY_LABEL] = $value; + $this->data[self::PROPERTY_LABEL] = $value; return $this; } @@ -41,7 +41,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setDescription(?string $value): static { - $this->data[self::JSON_PROPERTY_DESCRIPTION] = $value; + $this->data[self::PROPERTY_DESCRIPTION] = $value; return $this; } @@ -49,7 +49,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setPriority(?int $value): static { - $this->data[self::JSON_PROPERTY_PRIORITY] = $value; + $this->data[self::PROPERTY_PRIORITY] = $value; return $this; } @@ -57,7 +57,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setVisibility(?bool $value): static { - $this->data[self::JSON_PROPERTY_VISIBILITY] = $value; + $this->data[self::PROPERTY_VISIBILITY] = $value; return $this; } @@ -65,7 +65,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setColor(?string $value): static { - $this->data[self::JSON_PROPERTY_COLOR] = $value; + $this->data[self::PROPERTY_COLOR] = $value; return $this; } diff --git a/shared/lib/Chrono/Entity/EntityPropertiesBaseAbstract.php b/shared/lib/Chrono/Entity/EntityPropertiesBaseAbstract.php index 6b6d646..0031224 100644 --- a/shared/lib/Chrono/Entity/EntityPropertiesBaseAbstract.php +++ b/shared/lib/Chrono/Entity/EntityPropertiesBaseAbstract.php @@ -16,6 +16,6 @@ abstract class EntityPropertiesBaseAbstract extends NodePropertiesBaseAbstract i public const JSON_TYPE = EntityPropertiesBaseInterface::JSON_TYPE; public function getDataRaw(): array|string|null { - return $this->data[self::JSON_PROPERTY_DATA] ?? null; + return $this->data[self::PROPERTY_DATA] ?? null; } } diff --git a/shared/lib/Chrono/Entity/EntityPropertiesBaseInterface.php b/shared/lib/Chrono/Entity/EntityPropertiesBaseInterface.php index 8f91c6e..0fa6bca 100644 --- a/shared/lib/Chrono/Entity/EntityPropertiesBaseInterface.php +++ b/shared/lib/Chrono/Entity/EntityPropertiesBaseInterface.php @@ -14,7 +14,7 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; interface EntityPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'chrono:entity'; - public const JSON_PROPERTY_DATA = 'data'; + public const PROPERTY_DATA = 'data'; public function getDataRaw(): array|string|null; diff --git a/shared/lib/Chrono/Entity/EntityPropertiesMutableAbstract.php b/shared/lib/Chrono/Entity/EntityPropertiesMutableAbstract.php index 3917f4f..0a94ce2 100644 --- a/shared/lib/Chrono/Entity/EntityPropertiesMutableAbstract.php +++ b/shared/lib/Chrono/Entity/EntityPropertiesMutableAbstract.php @@ -24,7 +24,7 @@ abstract class EntityPropertiesMutableAbstract extends EntityPropertiesBaseAbstr } public function setDataRaw(array|string|null $value): static { - $this->data[self::JSON_PROPERTY_DATA] = $value; + $this->data[self::PROPERTY_DATA] = $value; return $this; } } diff --git a/shared/lib/Files/Node/INodeBase.php b/shared/lib/Files/Node/INodeBase.php index d76b348..6b47e56 100644 --- a/shared/lib/Files/Node/INodeBase.php +++ b/shared/lib/Files/Node/INodeBase.php @@ -14,16 +14,16 @@ use DateTimeImmutable; interface INodeBase extends \JsonSerializable { public const JSON_TYPE = 'files.node'; - public const JSON_PROPERTY_TYPE = '@type'; - public const JSON_PROPERTY_IN = 'in'; - public const JSON_PROPERTY_ID = 'id'; - public const JSON_PROPERTY_CREATED_ON = 'createdOn'; - public const JSON_PROPERTY_CREATED_BY = 'createdBy'; - public const JSON_PROPERTY_MODIFIED_ON = 'modifiedOn'; - public const JSON_PROPERTY_MODIFIED_BY = 'modifiedBy'; - public const JSON_PROPERTY_OWNER = 'owner'; - public const JSON_PROPERTY_SIGNATURE = 'signature'; - public const JSON_PROPERTY_LABEL = 'label'; + public const PROPERTY_TYPE = '@type'; + public const PROPERTY_IN = 'in'; + public const PROPERTY_ID = 'id'; + public const PROPERTY_CREATED_ON = 'createdOn'; + public const PROPERTY_CREATED_BY = 'createdBy'; + public const PROPERTY_MODIFIED_ON = 'modifiedOn'; + public const PROPERTY_MODIFIED_BY = 'modifiedBy'; + public const PROPERTY_OWNER = 'owner'; + public const PROPERTY_SIGNATURE = 'signature'; + public const PROPERTY_LABEL = 'label'; /** * Unique identifier of the parent node (folder) this node belongs to diff --git a/shared/lib/Files/Node/INodeEntityBase.php b/shared/lib/Files/Node/INodeEntityBase.php index d6bac3d..1dfc500 100644 --- a/shared/lib/Files/Node/INodeEntityBase.php +++ b/shared/lib/Files/Node/INodeEntityBase.php @@ -18,10 +18,10 @@ namespace KTXF\Files\Node; interface INodeEntityBase extends INodeBase { public const JSON_TYPE = 'files.entity'; - public const JSON_PROPERTY_SIZE = 'size'; - public const JSON_PROPERTY_MIME = 'mime'; - public const JSON_PROPERTY_FORMAT = 'format'; - public const JSON_PROPERTY_ENCODING = 'encoding'; + public const PROPERTY_SIZE = 'size'; + public const PROPERTY_MIME = 'mime'; + public const PROPERTY_FORMAT = 'format'; + public const PROPERTY_ENCODING = 'encoding'; /** * File size in bytes diff --git a/shared/lib/Mail/Service/ServiceBaseInterface.php b/shared/lib/Mail/Service/ServiceBaseInterface.php index aaee2d4..0d562c0 100644 --- a/shared/lib/Mail/Service/ServiceBaseInterface.php +++ b/shared/lib/Mail/Service/ServiceBaseInterface.php @@ -73,8 +73,8 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface { public const CAPABILITY_ENTITY_SORT_SIZE = 'size'; public const JSON_TYPE = 'mail.service'; - public const JSON_PROPERTY_PRIMARY_ADDRESS = 'primaryAddress'; - public const JSON_PROPERTY_SECONDARY_ADDRESSES = 'secondaryAddresses'; + public const PROPERTY_PRIMARY_ADDRESS = 'primaryAddress'; + public const PROPERTY_SECONDARY_ADDRESSES = 'secondaryAddresses'; /** * Gets the primary mailing address for this service diff --git a/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php b/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php index b8423b9..3c426fc 100644 --- a/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php +++ b/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php @@ -26,7 +26,7 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra * @inheritDoc */ public function content(): array { - $content = $this->data[self::JSON_PROPERTY_CONTENT] ?? null; + $content = $this->data[self::PROPERTY_CONTENT] ?? null; if (is_array($content)) { return array_map(function ($item) { return new CollectionContent($item); @@ -40,35 +40,35 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra * @inheritDoc */ public function getLabel(): string { - return $this->data[self::JSON_PROPERTY_LABEL] ?? ''; + return $this->data[self::PROPERTY_LABEL] ?? ''; } /** * @inheritDoc */ public function getDescription(): ?string { - return $this->data[self::JSON_PROPERTY_DESCRIPTION] ?? null; + return $this->data[self::PROPERTY_DESCRIPTION] ?? null; } /** * @inheritDoc */ public function getPriority(): ?int { - return $this->data[self::JSON_PROPERTY_PRIORITY] ?? null; + return $this->data[self::PROPERTY_PRIORITY] ?? null; } /** * @inheritDoc */ public function getVisibility(): ?bool { - return $this->data[self::JSON_PROPERTY_VISIBILITY] ?? null; + return $this->data[self::PROPERTY_VISIBILITY] ?? null; } /** * @inheritDoc */ public function getColor(): ?string { - return $this->data[self::JSON_PROPERTY_COLOR] ?? null; + return $this->data[self::PROPERTY_COLOR] ?? null; } } diff --git a/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php b/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php index 70e6ccb..06c9d3a 100644 --- a/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php +++ b/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php @@ -15,13 +15,13 @@ use PhpParser\Node\Expr\Array_; interface CollectionPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'people:collection'; - public const JSON_PROPERTY_CONTENT = 'content'; + public const PROPERTY_CONTENT = 'content'; - public const JSON_PROPERTY_LABEL = 'label'; - public const JSON_PROPERTY_DESCRIPTION = 'description'; - public const JSON_PROPERTY_PRIORITY = 'priority'; - public const JSON_PROPERTY_VISIBILITY = 'visibility'; - public const JSON_PROPERTY_COLOR = 'color'; + public const PROPERTY_LABEL = 'label'; + public const PROPERTY_DESCRIPTION = 'description'; + public const PROPERTY_PRIORITY = 'priority'; + public const PROPERTY_VISIBILITY = 'visibility'; + public const PROPERTY_COLOR = 'color'; /** * Gets the content type of this collection diff --git a/shared/lib/People/Collection/CollectionPropertiesMutableAbstract.php b/shared/lib/People/Collection/CollectionPropertiesMutableAbstract.php index 1070cce..ccca4f8 100644 --- a/shared/lib/People/Collection/CollectionPropertiesMutableAbstract.php +++ b/shared/lib/People/Collection/CollectionPropertiesMutableAbstract.php @@ -33,7 +33,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setLabel(string $value): static { - $this->data[self::JSON_PROPERTY_LABEL] = $value; + $this->data[self::PROPERTY_LABEL] = $value; return $this; } @@ -41,7 +41,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setDescription(?string $value): static { - $this->data[self::JSON_PROPERTY_DESCRIPTION] = $value; + $this->data[self::PROPERTY_DESCRIPTION] = $value; return $this; } @@ -49,7 +49,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setPriority(?int $value): static { - $this->data[self::JSON_PROPERTY_PRIORITY] = $value; + $this->data[self::PROPERTY_PRIORITY] = $value; return $this; } @@ -57,7 +57,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setVisibility(?bool $value): static { - $this->data[self::JSON_PROPERTY_VISIBILITY] = $value; + $this->data[self::PROPERTY_VISIBILITY] = $value; return $this; } @@ -65,7 +65,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB * @inheritDoc */ public function setColor(?string $value): static { - $this->data[self::JSON_PROPERTY_COLOR] = $value; + $this->data[self::PROPERTY_COLOR] = $value; return $this; } diff --git a/shared/lib/People/Entity/EntityPropertiesBaseAbstract.php b/shared/lib/People/Entity/EntityPropertiesBaseAbstract.php index 3c0c238..0b3c13c 100644 --- a/shared/lib/People/Entity/EntityPropertiesBaseAbstract.php +++ b/shared/lib/People/Entity/EntityPropertiesBaseAbstract.php @@ -16,6 +16,6 @@ abstract class EntityPropertiesBaseAbstract extends NodePropertiesBaseAbstract i public const JSON_TYPE = EntityPropertiesBaseInterface::JSON_TYPE; public function getDataRaw(): array|string|null { - return $this->data[self::JSON_PROPERTY_DATA] ?? null; + return $this->data[self::PROPERTY_DATA] ?? null; } } diff --git a/shared/lib/People/Entity/EntityPropertiesBaseInterface.php b/shared/lib/People/Entity/EntityPropertiesBaseInterface.php index e850f33..b05c0ef 100644 --- a/shared/lib/People/Entity/EntityPropertiesBaseInterface.php +++ b/shared/lib/People/Entity/EntityPropertiesBaseInterface.php @@ -14,7 +14,7 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; interface EntityPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'people:entity'; - public const JSON_PROPERTY_DATA = 'data'; + public const PROPERTY_DATA = 'data'; public function getDataRaw(): array|string|null; diff --git a/shared/lib/People/Entity/EntityPropertiesMutableAbstract.php b/shared/lib/People/Entity/EntityPropertiesMutableAbstract.php index 83ade23..8f7567a 100644 --- a/shared/lib/People/Entity/EntityPropertiesMutableAbstract.php +++ b/shared/lib/People/Entity/EntityPropertiesMutableAbstract.php @@ -24,7 +24,7 @@ abstract class EntityPropertiesMutableAbstract extends EntityPropertiesBaseAbstr } public function setDataRaw(array|string|null $value): static { - $this->data[self::JSON_PROPERTY_DATA] = $value; + $this->data[self::PROPERTY_DATA] = $value; return $this; } } diff --git a/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseAbstract.php b/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseAbstract.php index c92ec62..3714ee7 100644 --- a/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseAbstract.php +++ b/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseAbstract.php @@ -23,7 +23,7 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra public const JSON_TYPE = CollectionPropertiesBaseInterface::JSON_TYPE; public function content(): CollectionContent { - $content = $this->data[self::JSON_PROPERTY_CONTENTS] ?? null; + $content = $this->data[self::PROPERTY_CONTENTS] ?? null; if ($content instanceof CollectionContent) { return $content; } @@ -36,7 +36,7 @@ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstra } public function getLabel(): string { - return $this->data[self::JSON_PROPERTY_LABEL] ?? ''; + return $this->data[self::PROPERTY_LABEL] ?? ''; } } diff --git a/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseInterface.php b/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseInterface.php index 36c40c3..22c7835 100644 --- a/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseInterface.php +++ b/shared/lib/Resource/Documents/Collection/CollectionPropertiesBaseInterface.php @@ -14,8 +14,8 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; interface CollectionPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'document:collection'; - public const JSON_PROPERTY_CONTENTS = 'content'; - public const JSON_PROPERTY_LABEL = 'label'; + public const PROPERTY_CONTENTS = 'content'; + public const PROPERTY_LABEL = 'label'; public function content(): CollectionContent; diff --git a/shared/lib/Resource/Documents/Collection/CollectionPropertiesMutableAbstract.php b/shared/lib/Resource/Documents/Collection/CollectionPropertiesMutableAbstract.php index 66e8df6..1f430e6 100644 --- a/shared/lib/Resource/Documents/Collection/CollectionPropertiesMutableAbstract.php +++ b/shared/lib/Resource/Documents/Collection/CollectionPropertiesMutableAbstract.php @@ -27,7 +27,7 @@ abstract class CollectionPropertiesMutableAbstract extends CollectionPropertiesB } public function setLabel(string $value): static { - $this->data[self::JSON_PROPERTY_LABEL] = $value; + $this->data[self::PROPERTY_LABEL] = $value; return $this; } diff --git a/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseAbstract.php b/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseAbstract.php index 3268b0c..e1f71c8 100644 --- a/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseAbstract.php +++ b/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseAbstract.php @@ -16,23 +16,23 @@ abstract class EntityPropertiesBaseAbstract extends NodePropertiesBaseAbstract i public const JSON_TYPE = EntityPropertiesBaseInterface::JSON_TYPE; public function size(): int { - return $this->data[self::JSON_PROPERTY_SIZE] ?? 0; + return $this->data[self::PROPERTY_SIZE] ?? 0; } public function getLabel(): string { - return $this->data[self::JSON_PROPERTY_LABEL] ?? ''; + return $this->data[self::PROPERTY_LABEL] ?? ''; } public function getMime(): string { - return $this->data[self::JSON_PROPERTY_MIME] ?? ''; + return $this->data[self::PROPERTY_MIME] ?? ''; } public function getFormat(): string { - return $this->data[self::JSON_PROPERTY_FORMAT] ?? ''; + return $this->data[self::PROPERTY_FORMAT] ?? ''; } public function getEncoding(): string { - return $this->data[self::JSON_PROPERTY_ENCODING] ?? ''; + return $this->data[self::PROPERTY_ENCODING] ?? ''; } } diff --git a/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseInterface.php b/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseInterface.php index 93ad4b1..b427972 100644 --- a/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseInterface.php +++ b/shared/lib/Resource/Documents/Entity/EntityPropertiesBaseInterface.php @@ -14,11 +14,11 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; interface EntityPropertiesBaseInterface extends NodePropertiesBaseInterface { public const JSON_TYPE = 'document:file'; - public const JSON_PROPERTY_LABEL = 'label'; - public const JSON_PROPERTY_SIZE = 'size'; - public const JSON_PROPERTY_MIME = 'mime'; - public const JSON_PROPERTY_FORMAT = 'format'; - public const JSON_PROPERTY_ENCODING = 'encoding'; + public const PROPERTY_LABEL = 'label'; + public const PROPERTY_SIZE = 'size'; + public const PROPERTY_MIME = 'mime'; + public const PROPERTY_FORMAT = 'format'; + public const PROPERTY_ENCODING = 'encoding'; public function size(): int; diff --git a/shared/lib/Resource/Documents/Entity/EntityPropertiesMutableAbstract.php b/shared/lib/Resource/Documents/Entity/EntityPropertiesMutableAbstract.php index 26d8242..d02c819 100644 --- a/shared/lib/Resource/Documents/Entity/EntityPropertiesMutableAbstract.php +++ b/shared/lib/Resource/Documents/Entity/EntityPropertiesMutableAbstract.php @@ -24,22 +24,22 @@ abstract class EntityPropertiesMutableAbstract extends EntityPropertiesBaseAbstr } public function setLabel(string $value): static { - $this->data[self::JSON_PROPERTY_LABEL] = $value; + $this->data[self::PROPERTY_LABEL] = $value; return $this; } public function setMime(string $value): static { - $this->data[self::JSON_PROPERTY_MIME] = $value; + $this->data[self::PROPERTY_MIME] = $value; return $this; } public function setFormat(string $value): static { - $this->data[self::JSON_PROPERTY_FORMAT] = $value; + $this->data[self::PROPERTY_FORMAT] = $value; return $this; } public function setEncoding(string $value): static { - $this->data[self::JSON_PROPERTY_ENCODING] = $value; + $this->data[self::PROPERTY_ENCODING] = $value; return $this; } diff --git a/shared/lib/Resource/Provider/ResourceProviderBaseInterface.php b/shared/lib/Resource/Provider/ResourceProviderBaseInterface.php index dd134ce..9086f8d 100644 --- a/shared/lib/Resource/Provider/ResourceProviderBaseInterface.php +++ b/shared/lib/Resource/Provider/ResourceProviderBaseInterface.php @@ -16,10 +16,10 @@ interface ResourceProviderBaseInterface extends ProviderInterface, JsonSerializa public const CAPABILITY_SERVICE_EXTANT = 'ServiceExtant'; public const JSON_TYPE = 'resource.provider'; - public const JSON_PROPERTY_TYPE = '@type'; - public const JSON_PROPERTY_IDENTIFIER = 'identifier'; - public const JSON_PROPERTY_LABEL = 'label'; - public const JSON_PROPERTY_CAPABILITIES = 'capabilities'; + public const PROPERTY_TYPE = '@type'; + public const PROPERTY_IDENTIFIER = 'identifier'; + public const PROPERTY_LABEL = 'label'; + public const PROPERTY_CAPABILITIES = 'capabilities'; /** * Confirms if specific capability is supported (e.g. 'ServiceList') diff --git a/shared/lib/Resource/Provider/ResourceServiceBaseInterface.php b/shared/lib/Resource/Provider/ResourceServiceBaseInterface.php index 652507c..118d360 100644 --- a/shared/lib/Resource/Provider/ResourceServiceBaseInterface.php +++ b/shared/lib/Resource/Provider/ResourceServiceBaseInterface.php @@ -10,15 +10,15 @@ interface ResourceServiceBaseInterface extends JsonSerializable { // JSON Constants public const JSON_TYPE = 'resource.service'; - public const JSON_PROPERTY_TYPE = '@type'; - public const JSON_PROPERTY_PROVIDER = 'provider'; - public const JSON_PROPERTY_IDENTIFIER = 'identifier'; - public const JSON_PROPERTY_LABEL = 'label'; - public const JSON_PROPERTY_ENABLED = 'enabled'; - public const JSON_PROPERTY_CAPABILITIES = 'capabilities'; - public const JSON_PROPERTY_LOCATION = 'location'; - public const JSON_PROPERTY_IDENTITY = 'identity'; - public const JSON_PROPERTY_AUXILIARY = 'auxiliary'; + public const PROPERTY_TYPE = '@type'; + public const PROPERTY_PROVIDER = 'provider'; + public const PROPERTY_IDENTIFIER = 'identifier'; + public const PROPERTY_LABEL = 'label'; + public const PROPERTY_ENABLED = 'enabled'; + public const PROPERTY_CAPABILITIES = 'capabilities'; + public const PROPERTY_LOCATION = 'location'; + public const PROPERTY_IDENTITY = 'identity'; + public const PROPERTY_AUXILIARY = 'auxiliary'; /** * Confirms if specific capability is supported -- 2.39.5