Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ff8219

Browse files
committed
Improve CS in HttpFoundationExtension
1 parent 4e308aa commit 0ff8219

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ public function __construct($urlHelper)
4444

4545
@trigger_error(sprintf('Passing a "%s" instance as the first argument to the "%s" constructor is deprecated since Symfony 4.3, pass a "%s" instance instead.', RequestStack::class, __CLASS__, UrlHelper::class), E_USER_DEPRECATED);
4646

47+
$requestContext = null;
4748
if (2 === \func_num_args()) {
4849
$requestContext = \func_get_arg(1);
4950
if (!$requestContext instanceof RequestContext) {
5051
throw new \TypeError(sprintf('The second argument must be an instance of "%s".', RequestContext::class));
5152
}
52-
} else {
53-
$requestContext = null;
5453
}
5554

5655
$this->urlHelper = new UrlHelper($urlHelper, $requestContext);

0 commit comments

Comments
 (0)