eee
This commit is contained in:
+4
-3
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
namespace Kiri\Events;
|
||||
|
||||
|
||||
use Closure;
|
||||
use Psr\EventDispatcher\ListenerProviderInterface;
|
||||
use SplPriorityQueue;
|
||||
|
||||
@@ -35,11 +36,11 @@ class EventProvider implements ListenerProviderInterface
|
||||
|
||||
/**
|
||||
* @param string $event
|
||||
* @param array|\Closure|string $handler
|
||||
* @param array|Closure|string $handler
|
||||
* @param int $zOrder
|
||||
* @throws \Exception
|
||||
* @throws
|
||||
*/
|
||||
public function on(string $event, array|\Closure|string $handler, int $zOrder = 1)
|
||||
public function on(string $event, array|Closure|string $handler, int $zOrder = 1): void
|
||||
{
|
||||
if (is_string($handler) && !is_callable($handler, true)) {
|
||||
throw new \Exception('Event handler must is execute function.');
|
||||
|
||||
Reference in New Issue
Block a user