Skip to content

Commit 0c8ac7d

Browse files
Remove unused code and unnecessary else branches
1 parent 51cc3b3 commit 0c8ac7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Controller/ControllerResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ protected function instantiateController(string $class): object
2727
if ($controller instanceof AbstractController) {
2828
if (null === $previousContainer = $controller->setContainer($this->container)) {
2929
throw new \LogicException(\sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class));
30-
} else {
31-
$controller->setContainer($previousContainer);
3230
}
31+
32+
$controller->setContainer($previousContainer);
3333
}
3434

3535
return $controller;

0 commit comments

Comments
 (0)