Skip to content

Commit 9382289

Browse files
authored
Merge pull request #32 from OnitaAndrei/issue-31
Issue 31
2 parents 03e0578 + 37dac59 commit 9382289

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Event/DispatchControllerEventsTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Dot\Controller\AbstractController;
88
use Dot\Controller\Exception\RuntimeException;
9+
use Dot\Event\Event;
910
use Laminas\EventManager\EventManagerAwareTrait;
1011
use Laminas\EventManager\ResponseCollection;
1112
use Psr\Http\Message\ResponseInterface;
@@ -18,7 +19,7 @@ public function dispatchEvent(
1819
string $name,
1920
array $data = [],
2021
object|string|null $target = null
21-
): ControllerEvent|ResponseCollection {
22+
): Event|ResponseCollection {
2223
if (! $this instanceof AbstractController) {
2324
throw new RuntimeException('Only controllers can dispatch controller events');
2425
}

src/Factory/ControllerEventListenersInitializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ControllerEventListenersInitializer
2424
* @throws ContainerExceptionInterface
2525
* @throws NotFoundExceptionInterface
2626
*/
27-
public function __invoke(ContainerInterface $container, ?AbstractController $instance): void
27+
public function __invoke(ContainerInterface $container, mixed $instance): void
2828
{
2929
if ($instance instanceof AbstractController) {
3030
$this->attachControllerListeners($container, $instance);

0 commit comments

Comments
 (0)