Skip to content

Commit

Permalink
add args to push and pull methods
Browse files Browse the repository at this point in the history
  • Loading branch information
pvm1922 authored Mar 13, 2024
1 parent f157b49 commit 1021915
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ public function pull(CalendarViewParamsInterface $params, ?Closure $deltaLinkSto
$events,
$requestAdapter,
$requestConfiguration,
$deltaLinkStore
$deltaLinkStore,
$args
);

$this->logger?->info('All events received...', [
Expand Down Expand Up @@ -236,7 +237,7 @@ public function getInstancesCollection(string $id, ?InstancesRequestBuilderGetQu
*/
public function push(array $params = [], array $args = []): void
{
$eventsToWrite = $this->getLocalEvents();
$eventsToWrite = $this->getLocalEvents($params);

Check failure on line 240 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Interfaces\CalendarInterface::getLocalEvents() invoked with 1 parameter, 0 required.

Check failure on line 240 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Interfaces\CalendarInterface::getLocalEvents() invoked with 1 parameter, 0 required.
$this->batchPush($eventsToWrite, $params, $args);
}

Expand Down Expand Up @@ -469,7 +470,7 @@ protected function prepareUpsertAsync(Event $event, EventsRequestBuilderPostRequ
/**
* @throws \Exception
*/
protected function iterateThrough(DeltaGetResponse $events, RequestAdapter $requestAdapter, DeltaRequestBuilderGetRequestConfiguration $requestConfiguration, ?Closure $deltaLinkStore = null): void
protected function iterateThrough(DeltaGetResponse $events, RequestAdapter $requestAdapter, DeltaRequestBuilderGetRequestConfiguration $requestConfiguration, ?Closure $deltaLinkStore = null, array $args = []): void

Check failure on line 473 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Calendar::iterateThrough() has parameter $args with no value type specified in iterable type array.

Check failure on line 473 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Calendar::iterateThrough() has parameter $args with no value type specified in iterable type array.
{
$iterator = new PageIterator(
$events,
Expand All @@ -478,7 +479,7 @@ protected function iterateThrough(DeltaGetResponse $events, RequestAdapter $requ

$iterator->setHeaders($requestConfiguration->headers);

$iterator->iterate(function (?GraphEvent $event) {
$iterator->iterate(function (?GraphEvent $event) use ($args) {
if (null === $event) {
return true;
}
Expand All @@ -497,7 +498,7 @@ protected function iterateThrough(DeltaGetResponse $events, RequestAdapter $requ
return true;
}

$this->saveEventLocal($this->getEntity($event));
$this->saveEventLocal($this->getEntity($event), $args);

Check failure on line 501 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Interfaces\CalendarInterface::saveEventLocal() invoked with 2 parameters, 1 required.

Check failure on line 501 in src/Calendar.php

View workflow job for this annotation

GitHub Actions / Tests (8.1, false)

Method Symplicity\Outlook\Interfaces\CalendarInterface::saveEventLocal() invoked with 2 parameters, 1 required.

$this->logger?->info('Completed event processing', [
'event_id' => $event->getId(),
Expand Down

0 comments on commit 1021915

Please sign in to comment.