reduce serialization of null models

This commit is contained in:
Dennis Eichhorn 2022-11-09 23:02:52 +01:00
parent df45fb4fa9
commit c481a67800
4 changed files with 32 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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