Skip to content

Commit 09de391

Browse files
committed
feat: fix PHP 8.4 deprecations
1 parent 7fc2831 commit 09de391

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Anonymization/Anonymizer/Options.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function toDisplayString(): string
5656
));
5757
}
5858

59-
public function getString(string $name, string $default = null, bool $required = false): ?string
59+
public function getString(string $name, ?string $default = null, bool $required = false): ?string
6060
{
6161
$value = $this->get($name, $default, $required);
6262

@@ -71,7 +71,7 @@ public function getString(string $name, string $default = null, bool $required =
7171
throw new \InvalidArgumentException(\sprintf("Option '%s' must be a string", $name));
7272
}
7373

74-
public function getBool(string $name, bool $default = null, bool $required = false): ?bool
74+
public function getBool(string $name, ?bool $default = null, bool $required = false): ?bool
7575
{
7676
$value = $this->get($name, $default, $required);
7777

@@ -93,7 +93,7 @@ public function getBool(string $name, bool $default = null, bool $required = fal
9393
return (bool) $value;
9494
}
9595

96-
public function getInt(string $name, int $default = null, bool $required = false): ?int
96+
public function getInt(string $name, ?int $default = null, bool $required = false): ?int
9797
{
9898
$value = $this->get($name, $default, $required);
9999

@@ -108,7 +108,7 @@ public function getInt(string $name, int $default = null, bool $required = false
108108
throw new \InvalidArgumentException(\sprintf("Option '%s' must be an int", $name));
109109
}
110110

111-
public function getFloat(string $name, float $default = null, bool $required = false): ?float
111+
public function getFloat(string $name, ?float $default = null, bool $required = false): ?float
112112
{
113113
$value = $this->get($name, $default, $required);
114114

@@ -124,7 +124,7 @@ public function getFloat(string $name, float $default = null, bool $required = f
124124

125125
}
126126

127-
public function getDate(string $name, \DateTimeImmutable $default = null, bool $required = false): ?\DateTimeImmutable
127+
public function getDate(string $name, ?\DateTimeImmutable $default = null, bool $required = false): ?\DateTimeImmutable
128128
{
129129
$value = $this->get($name, $default, $required);
130130

@@ -143,7 +143,7 @@ public function getDate(string $name, \DateTimeImmutable $default = null, bool $
143143
}
144144
}
145145

146-
public function getInterval(string $name, \DateInterval $default = null, bool $required = false): ?\DateInterval
146+
public function getInterval(string $name, ?\DateInterval $default = null, bool $required = false): ?\DateInterval
147147
{
148148
$value = $this->get($name, $default, $required);
149149

src/Storage/Storage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function listBackups(
2323
string $connectionName = 'default',
2424
string $extension = 'sql',
2525
bool $onlyExpired = false,
26-
string $preserveFile = null
26+
?string $preserveFile = null
2727
): array {
2828
$config = $this->configReg->getConnectionConfig($connectionName);
2929
$storagePath = \rtrim($config->getStorageDirectory(), '/');

tests/Mock/TestingExecutionContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function buildViolation(string $message, array $parameters = []): Constra
4343
null,
4444
new class () implements TranslatorInterface {
4545
#[\Override]
46-
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string
46+
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
4747
{
4848
return $id;
4949
}
@@ -71,7 +71,7 @@ public function getObject(): ?object
7171
}
7272

7373
#[\Override]
74-
public function setNode(mixed $value, ?object $object, MetadataInterface $metadata = null, string $propertyPath): void {}
74+
public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath): void {}
7575

7676
#[\Override]
7777
public function setGroup(?string $group): void {}

0 commit comments

Comments
 (0)