createOpeningBalance( $manager, $this->getReference(FixtureReferences::EMPLOYEE_STANDARD, Employee::class), LeaveRuleCode::CDI_CDD_NON_FORFAIT, 2026, 0.0, 0.0 ); $this->createOpeningBalance( $manager, $this->getReference(FixtureReferences::EMPLOYEE_4H, Employee::class), LeaveRuleCode::CDI_CDD_NON_FORFAIT, 2026, 0.0, 0.0 ); $this->createOpeningBalance( $manager, $this->getReference(FixtureReferences::EMPLOYEE_FORFAIT, Employee::class), LeaveRuleCode::FORFAIT_218, 2026, 0.0, 0.0 ); $manager->flush(); } public function getDependencies(): array { return [ EmployeeFixtures::class, ]; } private function createOpeningBalance( ObjectManager $manager, Employee $employee, LeaveRuleCode $ruleCode, int $year, float $openingDays, float $openingSaturdays ): void { $balance = new EmployeeLeaveBalance() ->setEmployee($employee) ->setRuleCode($ruleCode) ->setYear($year) ->setOpeningDays($openingDays) ->setOpeningSaturdays($openingSaturdays) ->setAccruedDays(0.0) ->setAccruedSaturdays(0.0) ->setTakenDays(0.0) ->setTakenSaturdays(0.0) ->setClosingDays($openingDays) ->setClosingSaturdays($openingSaturdays) ->setIsLocked(false) ; $manager->persist($balance); } }