This commit is contained in:
2022-05-24 23:04:24 +02:00
parent 5ea12a581b
commit b22f361368
2 changed files with 61 additions and 58 deletions

View File

@@ -96,7 +96,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
]
)->toArray();
$ids = array_map(function ($item) { return $item['id']; }, $bareEvents['value']);
$ids = array_map(static function ($item) { return $item['id']; }, $bareEvents['value']);
$existingIdsInRange = $this->calendarRangeRepository->findRemoteIdsPresent($ids);
return array_values(
@@ -107,7 +107,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
// filter all event to keep only the one not in range
array_filter(
$bareEvents['value'],
function ($item) use ($existingIdsInRange) {
static function ($item) use ($existingIdsInRange) {
return (!$existingIdsInRange[$item['id']]) ?? true;
}
)