Skip to content

Commit

Permalink
Fixed vimeo/psalm#7196 and updated pure annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoboss committed Jan 6, 2022
1 parent 424e73c commit f568666
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/EventBus.php
Expand Up @@ -32,8 +32,7 @@ public function subscribe(string $eventName, callable $callback, int $priority =
$list = new ArrayList();
}

/** @noinspection PhpClosureCanBeConvertedToFirstClassCallableInspection Until psalm supports first class callables: vimeo/psalm#7196 */
$subscription = new Subscription($eventName, Closure::fromCallable($callback), $priority);
$subscription = new Subscription($eventName, $callback(...), $priority);

$list->add($subscription);

Expand Down

0 comments on commit f568666

Please sign in to comment.