reduce serialization of null models

This commit is contained in:
Dennis Eichhorn 2022-11-09 23:02:52 +01:00
parent 2e6dd6ef3a
commit 53f95ed962
3 changed files with 24 additions and 0 deletions

View File

@ -36,4 +36,12 @@ final class NullContract extends Contract
$this->id = $id;
parent::__construct();
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}

View File

@ -36,4 +36,12 @@ final class NullContractType extends ContractType
$this->id = $id;
parent::__construct();
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}

View File

@ -36,4 +36,12 @@ final class NullContractTypeL11n extends ContractTypeL11n
$this->id = $id;
parent::__construct();
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}