Skip to content

Commit

Permalink
Change closure to callable
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostzero committed Apr 21, 2021
1 parent e8a50af commit 7ffdd06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace GhostZero\Tmi;

use Closure;
use GhostZero\Tmi\Events\EventHandler;
use GhostZero\Tmi\Exceptions\ParseException;
use GhostZero\Tmi\Messages\IrcMessage;
Expand Down Expand Up @@ -147,12 +146,12 @@ public function getOptions(): ClientOptions
return $this->options;
}

public function any(Closure $closure): self
public function any(callable $closure): self
{
return $this->on('*', $closure);
}

public function on(string $event, Closure $closure): self
public function on(string $event, callable $closure): self
{
$this->eventHandler->addHandler($event, $closure);

Expand Down

0 comments on commit 7ffdd06

Please sign in to comment.