reduce serialization of null models

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

View File

@ -36,4 +36,12 @@ final class NullDepartment extends Department
$this->id = $id;
$this->unit = new NullUnit();
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}

View File

@ -35,4 +35,12 @@ final class NullPosition extends Position
{
$this->id = $id;
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}

View File

@ -38,4 +38,12 @@ final class NullUnit extends Unit
$this->id = $id;
$this->image = new NullMedia();
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return ['id' => $this->id];
}
}