f493ea237b
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #6 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
31 lines
726 B
PHP
31 lines
726 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Service\Contracts;
|
|
|
|
use App\Entity\Contract;
|
|
use App\Entity\Employee;
|
|
use App\Entity\EmployeeContractPeriod;
|
|
use App\Enum\ContractNature;
|
|
use DateTimeImmutable;
|
|
|
|
final class EmployeeContractPeriodBuilder
|
|
{
|
|
public function build(
|
|
Employee $employee,
|
|
Contract $contract,
|
|
DateTimeImmutable $startDate,
|
|
?DateTimeImmutable $endDate,
|
|
ContractNature $nature,
|
|
): EmployeeContractPeriod {
|
|
return new EmployeeContractPeriod()
|
|
->setEmployee($employee)
|
|
->setContract($contract)
|
|
->setStartDate($startDate)
|
|
->setEndDate($endDate)
|
|
->setContractNature($nature)
|
|
;
|
|
}
|
|
}
|