Skip to content

Commit

Permalink
Merge pull request #34 from Swahjak/feature/issue-31-correct-store-id…
Browse files Browse the repository at this point in the history
…-type

fix: storeId on AsyncEventPublisherInterface
  • Loading branch information
gowrizrh authored Dec 17, 2024
2 parents 57f5f58 + 1419575 commit e119109
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Api/AsyncEventPublisherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ interface AsyncEventPublisherInterface
*
* @param string $eventName
* @param array $data
* @param int $storeId
* @return void
*/
public function publish(string $eventName, array $data): void;
public function publish(string $eventName, array $data, int $storeId): void;
}
6 changes: 3 additions & 3 deletions Model/AsyncEventPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ public function __construct(
*
* @param string $eventName
* @param array $data
* @param string $storeId
* @param int $storeId
* @return void
*/
public function publish(string $eventName, array $data, string $storeId = "0"): void
public function publish(string $eventName, array $data, int $storeId = 0): void
{
$arguments = $this->serializer->serialize($data);

$data = [
$eventName,
$arguments,
$storeId
(string) $storeId
];

$this->publisher->publish(QueueMetadataInterface::EVENT_QUEUE, $data);
Expand Down

0 comments on commit e119109

Please sign in to comment.