refactor: object property names
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user