refactor: documents
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -26,8 +26,8 @@ abstract class NodePropertiesBaseAbstract implements NodePropertiesBaseInterface
|
||||
$data[static::JSON_PROPERTY_TYPE] = static::JSON_TYPE;
|
||||
}
|
||||
|
||||
if (!isset($data[static::JSON_PROPERTY_VERSION])) {
|
||||
$data[static::JSON_PROPERTY_VERSION] = 1;
|
||||
if (!isset($data[static::JSON_PROPERTY_SCHEMA])) {
|
||||
$data[static::JSON_PROPERTY_SCHEMA] = 1;
|
||||
}
|
||||
|
||||
$this->data = $data;
|
||||
@@ -50,8 +50,8 @@ abstract class NodePropertiesBaseAbstract implements NodePropertiesBaseInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function version(): int {
|
||||
return $this->data[static::JSON_PROPERTY_VERSION];
|
||||
public function schema(): int {
|
||||
return $this->data[static::JSON_PROPERTY_SCHEMA];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ interface NodePropertiesBaseInterface extends JsonSerializable {
|
||||
|
||||
public const JSON_TYPE = 'resource.data';
|
||||
public const JSON_PROPERTY_TYPE = '@type';
|
||||
public const JSON_PROPERTY_VERSION = 'version';
|
||||
public const JSON_PROPERTY_SCHEMA = 'schema';
|
||||
|
||||
/**
|
||||
* Get resource node properties type
|
||||
@@ -30,8 +30,8 @@ interface NodePropertiesBaseInterface extends JsonSerializable {
|
||||
public function type(): string;
|
||||
|
||||
/**
|
||||
* Get resource node properties version
|
||||
* Get resource node properties schema
|
||||
*/
|
||||
public function version(): int;
|
||||
public function schema(): int;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user