Skip to content

Commit

Permalink
Reorder args passed to event dispatcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Nikolaev committed Nov 28, 2019
1 parent 6b55604 commit ac1ee66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cloner/Cloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private function cloneObject($object, bool $requireClonable)
}

$event = new CloneEvent($object, $clone);
$this->eventDispatcher->dispatch(ClonableEvents::CLONED, $event);
$this->eventDispatcher->dispatch($event, ClonableEvents::CLONED);

return $event->getClone();
}
Expand Down
2 changes: 1 addition & 1 deletion Sluggable/SluggableEntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function generateSlugs($entity, $dispatchUpdateEvent = false, $prefix = n
return false;
}
if ($dispatchUpdateEvent) {
$this->eventDispatcher->dispatch(SluggableEvents::SLUGS_UPDATED, new SlugsUpdateEvent($slugsChangeSet, $em));
$this->eventDispatcher->dispatch(new SlugsUpdateEvent($slugsChangeSet, $em), SluggableEvents::SLUGS_UPDATED);
}

return true;
Expand Down

0 comments on commit ac1ee66

Please sign in to comment.