Skip to content

Commit b0d281b

Browse files
committed
phpstan
1 parent 5e68646 commit b0d281b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Listener/LazyContainerListener.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public function __construct(ContainerInterface $container, ContainerListenerHelp
2424
$this->listener = $listener;
2525
}
2626

27-
public function __invoke(...$args)
27+
/**
28+
* @param mixed ...$args
29+
*/
30+
public function __invoke(...$args): void
2831
{
2932
/** @var object $service */
3033
$service = $this->container->get($this->listener->getService());
@@ -38,11 +41,17 @@ public function __invoke(...$args)
3841
$service->{$this->listener->getMethod()}(...$args);
3942
}
4043

44+
/**
45+
* @return callable
46+
*/
4147
public function getWrapped(): callable
4248
{
43-
return [
49+
/** @var callable $listener */
50+
$listener = [
4451
$this->container->get($this->listener->getService()),
4552
$this->listener->getMethod()
4653
];
54+
55+
return $listener;
4756
}
4857
}

0 commit comments

Comments
 (0)