Skip to content

Commit eb6384f

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [CS] Replace easy occurences of ?: with ??
2 parents 48be696 + 778a1c9 commit eb6384f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Container implements ContainerInterface, ResetInterface
6464

6565
public function __construct(ParameterBagInterface $parameterBag = null)
6666
{
67-
$this->parameterBag = $parameterBag ?: new EnvPlaceholderParameterBag();
67+
$this->parameterBag = $parameterBag ?? new EnvPlaceholderParameterBag();
6868
}
6969

7070
/**

ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public function getReflectionClass(?string $class, bool $throw = true): ?\Reflec
363363

364364
if ($this->trackResources) {
365365
if (!$classReflector) {
366-
$this->addResource($resource ?: new ClassExistenceResource($class, false));
366+
$this->addResource($resource ?? new ClassExistenceResource($class, false));
367367
} elseif (!$classReflector->isInternal()) {
368368
$path = $classReflector->getFileName();
369369

Tests/Compiler/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function testCanDecorateServiceLocator()
176176
public function testYamlContainerCompiles($directory, $actualServiceId, $expectedServiceId, ContainerBuilder $mainContainer = null)
177177
{
178178
// allow a container to be passed in, which might have autoconfigure settings
179-
$container = $mainContainer ?: new ContainerBuilder();
179+
$container = $mainContainer ?? new ContainerBuilder();
180180
$container->setResourceTracking(false);
181181
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Fixtures/yaml/integration/'.$directory));
182182
$loader->load('main.yml');

0 commit comments

Comments
 (0)