Skip to content

Commit 0b8be70

Browse files
committed
Refactor supportsDenormalization function format
The supportsDenormalization function in both JWESerializer.php and JWSSerializer.php files were refactored. This was primarily for improved readability, with arguments now listed out on separate lines.
1 parent ba07e0f commit 0b8be70

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/Bundle/Serializer/JWESerializer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ public function getSupportedTypes(?string $format): array
3333
];
3434
}
3535

36-
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
37-
{
36+
public function supportsDenormalization(
37+
mixed $data,
38+
string $type,
39+
?string $format = null,
40+
array $context = []
41+
): bool {
3842
return $type === JWE::class
3943
&& class_exists(JWESerializerManager::class)
4044
&& $this->formatSupported($format);

src/Bundle/Serializer/JWSSerializer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ public function getSupportedTypes(?string $format): array
3333
];
3434
}
3535

36-
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
37-
{
36+
public function supportsDenormalization(
37+
mixed $data,
38+
string $type,
39+
?string $format = null,
40+
array $context = []
41+
): bool {
3842
return $type === JWS::class
3943
&& class_exists(JWSSerializerManager::class)
4044
&& $this->formatSupported($format);

0 commit comments

Comments
 (0)