Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
III-1491: Moved handle methods in RemotelySyncUiTPASCommandHandler to…
Browse files Browse the repository at this point in the history
… be on top of the private methods.
  • Loading branch information
bertramakers committed Nov 2, 2016
1 parent e06a5cb commit 189aa24
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions src/Command/RemotelySyncUiTPASCommandHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ public function __construct(CultureFeed_Uitpas $culturefeedClient)
$this->logger = new NullLogger();
}

/**
* @param RemotelyRegisterUiTPASEvent $command
*/
protected function handleRemotelyRegisterUiTPASEvent(
RemotelyRegisterUiTPASEvent $command
) {
$event = $this->buildEvent($command);
$this->syncEvent($event, ['registerEvent', 'updateEvent']);
}

/**
* @param RemotelyUpdateUiTPASEvent $command
*/
protected function handleRemotelyUpdateUiTPASEvent(
RemotelyUpdateUiTPASEvent $command
) {
$event = $this->buildEvent($command);
$this->syncEvent($event, ['updateEvent', 'registerEvent']);
}

/**
* @var RemotelySyncUiTPASEvent $command
*
Expand Down Expand Up @@ -68,6 +88,10 @@ function ($keyId) {
return $event;
}

/**
* @param CultureFeed_Uitpas_Event_CultureEvent $event
* @param array $strategies
*/
private function syncEvent(
CultureFeed_Uitpas_Event_CultureEvent $event,
array $strategies
Expand Down Expand Up @@ -114,18 +138,4 @@ private function syncEvent(
);
}
}

protected function handleRemotelyRegisterUiTPASEvent(
RemotelyRegisterUiTPASEvent $command
) {
$event = $this->buildEvent($command);
$this->syncEvent($event, ['registerEvent', 'updateEvent']);
}

protected function handleRemotelyUpdateUiTPASEvent(
RemotelyUpdateUiTPASEvent $command
) {
$event = $this->buildEvent($command);
$this->syncEvent($event, ['updateEvent', 'registerEvent']);
}
}

0 comments on commit 189aa24

Please sign in to comment.