Skip to content

Commit 57e8e76

Browse files
committed
Switch arguments for event dispatcher
1 parent 620d4a2 commit 57e8e76

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FormHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public function handle($class, array $options = []): FormRequest
109109
$event = new FormHandlerEvent($handler, $form, $formRequest);
110110

111111
if ($form->isValid()) {
112-
$this->dispatcher->dispatch(FormHandlerEvents::EVENT_FORM_SUCCESS, $event);
112+
$this->dispatcher->dispatch($event, FormHandlerEvents::EVENT_FORM_SUCCESS);
113113
} else {
114-
$this->dispatcher->dispatch(FormHandlerEvents::EVENT_FORM_FAIL, $event);
114+
$this->dispatcher->dispatch($event, FormHandlerEvents::EVENT_FORM_FAIL);
115115
}
116116

117117
if ($response = $event->getResponse()) {

0 commit comments

Comments
 (0)