Skip to content

Commit bb36732

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [CS] Replace easy occurences of ?: with ??
2 parents 56ddb0f + 859bce5 commit bb36732

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function __construct(LoaderInterface $loader, $resource, array $options =
102102
$this->loader = $loader;
103103
$this->resource = $resource;
104104
$this->logger = $logger;
105-
$this->context = $context ?: new RequestContext();
105+
$this->context = $context ?? new RequestContext();
106106
$this->setOptions($options);
107107
$this->defaultLocale = $defaultLocale;
108108
}

Tests/Matcher/CompiledRedirectableUrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function getUrlMatcher(RouteCollection $routes, RequestContext $contex
2525
$compiledRoutes = $dumper->getCompiledRoutes();
2626

2727
return $this->getMockBuilder(TestCompiledRedirectableUrlMatcher::class)
28-
->setConstructorArgs([$compiledRoutes, $context ?: new RequestContext()])
28+
->setConstructorArgs([$compiledRoutes, $context ?? new RequestContext()])
2929
->setMethods(['redirect'])
3030
->getMock();
3131
}

Tests/Matcher/CompiledUrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ protected function getUrlMatcher(RouteCollection $routes, RequestContext $contex
2222
{
2323
$dumper = new CompiledUrlMatcherDumper($routes);
2424

25-
return new CompiledUrlMatcher($dumper->getCompiledRoutes(), $context ?: new RequestContext());
25+
return new CompiledUrlMatcher($dumper->getCompiledRoutes(), $context ?? new RequestContext());
2626
}
2727
}

Tests/Matcher/RedirectableUrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,6 @@ public function testTrailingRequirementWithDefault_A()
211211

212212
protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
213213
{
214-
return $this->getMockForAbstractClass(RedirectableUrlMatcher::class, [$routes, $context ?: new RequestContext()]);
214+
return $this->getMockForAbstractClass(RedirectableUrlMatcher::class, [$routes, $context ?? new RequestContext()]);
215215
}
216216
}

Tests/Matcher/TraceableUrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ public function testRoutesWithConditions()
121121

122122
protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
123123
{
124-
return new TraceableUrlMatcher($routes, $context ?: new RequestContext());
124+
return new TraceableUrlMatcher($routes, $context ?? new RequestContext());
125125
}
126126
}

Tests/Matcher/UrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,6 @@ public function testRestrictiveTrailingRequirementWithStaticRouteAfter()
943943

944944
protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
945945
{
946-
return new UrlMatcher($routes, $context ?: new RequestContext());
946+
return new UrlMatcher($routes, $context ?? new RequestContext());
947947
}
948948
}

0 commit comments

Comments
 (0)