Skip to content

Commit

Permalink
Dispatcher::unregisterHandler - revert arrow function to support PHP 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
burithetech authored and tomaj committed Apr 29, 2024
1 parent d33a508 commit 4056c6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ public function unregisterHandler(string $type, HandlerInterface $handler): Disp
}
$this->handlers[$type] = array_filter(
$this->handlers[$type],
fn ($registeredHandler) => $registeredHandler !== $handler
function (HandlerInterface $registeredHandler) use ($handler) {
return $registeredHandler !== $handler;
}
);

return $this;
Expand Down

0 comments on commit 4056c6d

Please sign in to comment.