Skip to content

Commit dc80291

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent cd3b6b7 commit dc80291

File tree

91 files changed

+241
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+241
-241
lines changed

Constraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static function getErrorName(string $errorCode)
108108
* array, but getDefaultOption() returns
109109
* null
110110
*/
111-
public function __construct($options = null, array $groups = null, $payload = null)
111+
public function __construct($options = null, ?array $groups = null, $payload = null)
112112
{
113113
unset($this->groups); // enable lazy initialization
114114

ConstraintViolation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ConstraintViolation implements ConstraintViolationInterface
4949
* caused the violation
5050
* @param mixed $cause The cause of the violation
5151
*/
52-
public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, string $code = null, Constraint $constraint = null, $cause = null)
52+
public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, ?int $plural = null, ?string $code = null, ?Constraint $constraint = null, $cause = null)
5353
{
5454
if (!\is_string($message) && !(\is_object($message) && method_exists($message, '__toString'))) {
5555
throw new \TypeError('Constraint violation message should be a string or an object which implements the __toString() method.');

Constraints/AbstractComparison.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class AbstractComparison extends Constraint
3333
*
3434
* @param mixed $value the value to compare or a set of options
3535
*/
36-
public function __construct($value = null, $propertyPath = null, string $message = null, array $groups = null, $payload = null, array $options = [])
36+
public function __construct($value = null, $propertyPath = null, ?string $message = null, ?array $groups = null, $payload = null, array $options = [])
3737
{
3838
if (\is_array($value)) {
3939
$options = array_merge($value, $options);

Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator
2929
{
3030
private $propertyAccessor;
3131

32-
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
32+
public function __construct(?PropertyAccessorInterface $propertyAccessor = null)
3333
{
3434
$this->propertyAccessor = $propertyAccessor;
3535
}

Constraints/All.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class All extends Composite
2222
{
2323
public $constraints = [];
2424

25-
public function __construct($constraints = null, array $groups = null, $payload = null)
25+
public function __construct($constraints = null, ?array $groups = null, $payload = null)
2626
{
2727
parent::__construct($constraints ?? [], $groups, $payload);
2828
}

Constraints/AtLeastOneOf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AtLeastOneOf extends Composite
3131
public $messageCollection = 'Each element of this collection should satisfy its own set of constraints.';
3232
public $includeInternalMessages = true;
3333

34-
public function __construct($constraints = null, array $groups = null, $payload = null, string $message = null, string $messageCollection = null, bool $includeInternalMessages = null)
34+
public function __construct($constraints = null, ?array $groups = null, $payload = null, ?string $message = null, ?string $messageCollection = null, ?bool $includeInternalMessages = null)
3535
{
3636
parent::__construct($constraints ?? [], $groups, $payload);
3737

Constraints/Bic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Bic extends Constraint
5252
*
5353
* @param string|PropertyPathInterface|null $ibanPropertyPath
5454
*/
55-
public function __construct(array $options = null, string $message = null, string $iban = null, $ibanPropertyPath = null, string $ibanMessage = null, array $groups = null, $payload = null)
55+
public function __construct(?array $options = null, ?string $message = null, ?string $iban = null, $ibanPropertyPath = null, ?string $ibanMessage = null, ?array $groups = null, $payload = null)
5656
{
5757
if (!class_exists(Countries::class)) {
5858
throw new LogicException('The Intl component is required to use the Bic constraint. Try running "composer require symfony/intl".');

Constraints/BicValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class BicValidator extends ConstraintValidator
5858

5959
private $propertyAccessor;
6060

61-
public function __construct(PropertyAccessor $propertyAccessor = null)
61+
public function __construct(?PropertyAccessor $propertyAccessor = null)
6262
{
6363
$this->propertyAccessor = $propertyAccessor;
6464
}

Constraints/Blank.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Blank extends Constraint
3030

3131
public $message = 'This value should be blank.';
3232

33-
public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null)
33+
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, $payload = null)
3434
{
3535
parent::__construct($options ?? [], $groups, $payload);
3636

Constraints/Callback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Callback extends Constraint
3232
*
3333
* @param array|string|callable $callback The callback or a set of options
3434
*/
35-
public function __construct($callback = null, array $groups = null, $payload = null, array $options = [])
35+
public function __construct($callback = null, ?array $groups = null, $payload = null, array $options = [])
3636
{
3737
// Invocation through annotations with an array parameter only
3838
if (\is_array($callback) && 1 === \count($callback) && isset($callback['value'])) {

0 commit comments

Comments
 (0)