Skip to content

Commit 1e2c337

Browse files
minor symfony#54644 [Serializer] add method parameters in final class (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [Serializer] add method parameters in final class | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 56ce439 add method parameters in final class
2 parents df033a0 + 56ce439 commit 1e2c337

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public function __construct(
3636
) {
3737
}
3838

39+
/**
40+
* @param class-string|null $class
41+
* @param string|null $format
42+
* @param array<string, mixed> $context
43+
*/
3944
public function normalize(string $propertyName/* , ?string $class = null, ?string $format = null, array $context = [] */): string
4045
{
4146
if (null === $this->attributes || \in_array($propertyName, $this->attributes, true)) {
@@ -45,6 +50,11 @@ public function normalize(string $propertyName/* , ?string $class = null, ?strin
4550
return $propertyName;
4651
}
4752

53+
/**
54+
* @param class-string|null $class
55+
* @param string|null $format
56+
* @param array<string, mixed> $context
57+
*/
4858
public function denormalize(string $propertyName/* , ?string $class = null, ?string $format = null, array $context = [] */): string
4959
{
5060
$class = 1 < \func_num_args() ? func_get_arg(1) : null;

src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
) {
4242
}
4343

44-
public function normalize(string $propertyName/* , ?string $class = null, ?string $format = null, array $context = [] */): string
44+
public function normalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
4545
{
4646
$class = 1 < \func_num_args() ? func_get_arg(1) : null;
4747
$format = 2 < \func_num_args() ? func_get_arg(2) : null;
@@ -58,7 +58,7 @@ public function normalize(string $propertyName/* , ?string $class = null, ?strin
5858
return self::$normalizeCache[$class][$propertyName] ?? $this->normalizeFallback($propertyName, $class, $format, $context);
5959
}
6060

61-
public function denormalize(string $propertyName/* , ?string $class = null, ?string $format = null, array $context = [] */): string
61+
public function denormalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
6262
{
6363
$class = 1 < \func_num_args() ? func_get_arg(1) : null;
6464
$format = 2 < \func_num_args() ? func_get_arg(2) : null;

0 commit comments

Comments
 (0)