Skip to content

Commit 778b140

Browse files
committed
[CS] Replace easy occurences of ?: with ??
1 parent f074529 commit 778b140

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

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

Tests/Compiler/IntegrationTest.php

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

0 commit comments

Comments
 (0)