Skip to content

Commit f6d8318

Browse files
committed
[CS] Replace easy occurences of ?: with ??
1 parent 2414283 commit f6d8318

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Definition/Builder/TreeBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(string $name = null, string $type = 'array', NodeBui
2929
if (null === $name) {
3030
@trigger_error('A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.', \E_USER_DEPRECATED);
3131
} else {
32-
$builder = $builder ?: new NodeBuilder();
32+
$builder = $builder ?? new NodeBuilder();
3333
$this->root = $builder->node($name, $type)->setParent($this);
3434
}
3535
}
@@ -50,7 +50,7 @@ public function root($name, $type = 'array', NodeBuilder $builder = null)
5050
{
5151
@trigger_error(sprintf('The "%s()" method called for the "%s" configuration is deprecated since Symfony 4.3, pass the root name to the constructor instead.', __METHOD__, $name), \E_USER_DEPRECATED);
5252

53-
$builder = $builder ?: new NodeBuilder();
53+
$builder = $builder ?? new NodeBuilder();
5454

5555
return $this->root = $builder->node($name, $type)->setParent($this);
5656
}

0 commit comments

Comments
 (0)