Skip to content

Commit 0323477

Browse files
authored
Removed useless method call() from callable function. (#5029)
1 parent c1d14a4 commit 0323477

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CoreMiddleware.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public function __construct(ContainerInterface $container, Protocol $protocol, H
4040
protected function handleFound(Dispatched $dispatched, ServerRequestInterface $request): mixed
4141
{
4242
if ($dispatched->handler->callback instanceof Closure) {
43-
$response = call($dispatched->handler->callback);
43+
$callback = $dispatched->handler->callback;
44+
$response = $callback();
4445
} else {
4546
[$controller, $action] = $this->prepareHandler($dispatched->handler->callback);
4647
$controllerInstance = $this->container->get($controller);

0 commit comments

Comments
 (0)