refactor: object property names
Build Test / build (pull_request) Successful in 14s
JS Unit Tests / test (pull_request) Successful in 13s
PHP Unit Tests / test (pull_request) Successful in 35s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-16 13:19:40 -04:00
parent 6dadd13acf
commit 388e3fb8b8
23 changed files with 88 additions and 88 deletions
@@ -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] ?? '';
}
}
@@ -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;
@@ -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;
}