Skip to content

Commit 778a1c9

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [CS] Replace easy occurences of ?: with ??
2 parents d0ea7d0 + 778b140 commit 778a1c9

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
@@ -357,7 +357,7 @@ public function getReflectionClass(?string $class, bool $throw = true): ?\Reflec
357357

358358
if ($this->trackResources) {
359359
if (!$classReflector) {
360-
$this->addResource($resource ?: new ClassExistenceResource($class, false));
360+
$this->addResource($resource ?? new ClassExistenceResource($class, false));
361361
} elseif (!$classReflector->isInternal()) {
362362
$path = $classReflector->getFileName();
363363

Tests/Compiler/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function testCanDecorateServiceLocator()
168168
public function testYamlContainerCompiles($directory, $actualServiceId, $expectedServiceId, ContainerBuilder $mainContainer = null)
169169
{
170170
// allow a container to be passed in, which might have autoconfigure settings
171-
$container = $mainContainer ?: new ContainerBuilder();
171+
$container = $mainContainer ?? new ContainerBuilder();
172172
$container->setResourceTracking(false);
173173
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Fixtures/yaml/integration/'.$directory));
174174
$loader->load('main.yml');

0 commit comments

Comments
 (0)