Skip to content

Commit 5ca3c4b

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [CS] Replace easy occurences of ?: with ??
2 parents 40fbaed + f27a39b commit 5ca3c4b

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

Extension/Core/CoreExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CoreExtension extends AbstractExtension
3535
public function __construct(PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null, TranslatorInterface $translator = null)
3636
{
3737
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
38-
$this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor));
38+
$this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor));
3939
$this->translator = $translator;
4040
}
4141

Extension/Core/DataTransformer/DateTimeToArrayTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(string $inputTimezone = null, string $outputTimezone
4242

4343
$this->fields = $fields;
4444
$this->pad = $pad;
45-
$this->referenceDate = $referenceDate ?: new \DateTimeImmutable('1970-01-01 00:00:00');
45+
$this->referenceDate = $referenceDate ?? new \DateTimeImmutable('1970-01-01 00:00:00');
4646
}
4747

4848
/**

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ChoiceType extends AbstractType
5656
*/
5757
public function __construct(ChoiceListFactoryInterface $choiceListFactory = null, $translator = null)
5858
{
59-
$this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator(
59+
$this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator(
6060
new PropertyAccessDecorator(
6161
new DefaultChoiceListFactory()
6262
)

Extension/Csrf/EventListener/CsrfValidationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(string $fieldName, CsrfTokenManagerInterface $tokenM
4848
$this->errorMessage = $errorMessage;
4949
$this->translator = $translator;
5050
$this->translationDomain = $translationDomain;
51-
$this->serverParams = $serverParams ?: new ServerParams();
51+
$this->serverParams = $serverParams ?? new ServerParams();
5252
}
5353

5454
public function preSubmit(FormEvent $event)

Extension/HttpFoundation/HttpFoundationRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface
3232

3333
public function __construct(ServerParams $serverParams = null)
3434
{
35-
$this->serverParams = $serverParams ?: new ServerParams();
35+
$this->serverParams = $serverParams ?? new ServerParams();
3636
}
3737

3838
/**

Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class FormTypeHttpFoundationExtension extends AbstractTypeExtension
2626

2727
public function __construct(RequestHandlerInterface $requestHandler = null)
2828
{
29-
$this->requestHandler = $requestHandler ?: new HttpFoundationRequestHandler();
29+
$this->requestHandler = $requestHandler ?? new HttpFoundationRequestHandler();
3030
}
3131

3232
/**

FormFactoryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function getFormFactory()
180180
$extensions[] = new PreloadedExtension($this->types, $this->typeExtensions, $typeGuesser);
181181
}
182182

183-
$registry = new FormRegistry($extensions, $this->resolvedTypeFactory ?: new ResolvedFormTypeFactory());
183+
$registry = new FormRegistry($extensions, $this->resolvedTypeFactory ?? new ResolvedFormTypeFactory());
184184

185185
return new FormFactory($registry);
186186
}

NativeRequestHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class NativeRequestHandler implements RequestHandlerInterface
3636

3737
public function __construct(ServerParams $params = null)
3838
{
39-
$this->serverParams = $params ?: new ServerParams();
39+
$this->serverParams = $params ?? new ServerParams();
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)