Files
SIRH/src/Service/Contracts/EmployeeContractPeriodBuilder.php
tristan 339d650b41
All checks were successful
Auto Tag Develop / tag (push) Successful in 8s
feat : ajout de la gestion des heures chauffeurs
2026-03-15 19:04:52 +01:00

33 lines
795 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,
bool $isDriver = false,
): EmployeeContractPeriod {
return new EmployeeContractPeriod()
->setEmployee($employee)
->setContract($contract)
->setStartDate($startDate)
->setEndDate($endDate)
->setContractNature($nature)
->setIsDriver($isDriver)
;
}
}