Update dependencies

This commit is contained in:
Chris Hunt
2022-11-14 19:35:16 +00:00
parent 0966639699
commit ee77d09c58
677 changed files with 9253 additions and 65635 deletions

View File

@@ -18,7 +18,7 @@ namespace Symfony\Component\EventDispatcher;
*/
class ImmutableEventDispatcher implements EventDispatcherInterface
{
private $dispatcher;
private EventDispatcherInterface $dispatcher;
public function __construct(EventDispatcherInterface $dispatcher)
{
@@ -36,7 +36,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
public function addListener(string $eventName, $listener, int $priority = 0)
public function addListener(string $eventName, callable|array $listener, int $priority = 0)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
@@ -52,7 +52,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
public function removeListener(string $eventName, $listener)
public function removeListener(string $eventName, callable|array $listener)
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
@@ -68,7 +68,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
public function getListeners(string $eventName = null)
public function getListeners(string $eventName = null): array
{
return $this->dispatcher->getListeners($eventName);
}
@@ -76,7 +76,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
public function getListenerPriority(string $eventName, $listener)
public function getListenerPriority(string $eventName, callable|array $listener): ?int
{
return $this->dispatcher->getListenerPriority($eventName, $listener);
}
@@ -84,7 +84,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
public function hasListeners(string $eventName = null)
public function hasListeners(string $eventName = null): bool
{
return $this->dispatcher->hasListeners($eventName);
}