Skip to content

Commit 379a4f1

Browse files
committed
GreetingNormalizer: Fix type hint & PHPDoc
1 parent 530d80a commit 379a4f1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

code_samples/api/rest_api/src/Rest/Serializer/GreetingNormalizer.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
88
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
99

10-
/**
11-
* @method array getSupportedTypes(?string $format)
12-
*/
1310
class GreetingNormalizer implements NormalizerInterface, NormalizerAwareInterface
1411
{
1512
use NormalizerAwareTrait;
@@ -19,10 +16,8 @@ public function supportsNormalization(mixed $data, ?string $format = null)
1916
return $data instanceof Greeting;
2017
}
2118

22-
/**
23-
* @param \App\Rest\Values\Greeting $object
24-
*/
25-
public function normalize(mixed $object, ?string $format = null, array $context = []): array
19+
/** @param Greeting $object */
20+
public function normalize(mixed $object, ?string $format = null, array $context = []): mixed
2621
{
2722
$data = [
2823
'Salutation' => $object->salutation,

0 commit comments

Comments
 (0)