Skip to content

Commit

Permalink
Cs Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed Mar 23, 2024
1 parent f530150 commit 47e5db4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function clearCurrent()
/**
* Bind events.
*/
public function on(string $table, array|string $eventType, array|callable|Closure|string $action = null): void
public function on(string $table, array|string $eventType, array|callable|Closure|string|null $action = null): void
{
// table as db.tb1,db.tb2,...
if (str_contains($table, ',')) {
Expand Down Expand Up @@ -296,7 +296,7 @@ public function dispatch(EventDTO $event): void
*
* @param mixed $events
*/
public function fire($events, EventDTO $event = null): void
public function fire($events, ?EventDTO $event = null): void
{
collect($events)->each(function ($e) use ($event) {
collect(Arr::get($this->events, $e))->each(fn ($action) => $this->call(...$this->parseAction($action, $event)));
Expand Down

0 comments on commit 47e5db4

Please sign in to comment.