*/ final class SynchronizeEmployeesWithArcadiaApi implements Action { public function __construct( private readonly EmployeeRepository $employeeRepository, private readonly EmployeeSyncService $syncService ) { } /** @param \App\Contracts\ActionInputEmpty $input */ public function __invoke(ActionInput $input): void { Assert::isAOf($input, ActionInputEmpty::class); $wasLastSyncedAt = $this->employeeRepository->getMostRecentSyncDate(); $this->syncService->synchronize($wasLastSyncedAt); } }