Skip to content

Commit 669b4f2

Browse files
committed
minor #13846 Update TypeHint Serializer.rst (zairigimad)
This PR was merged into the 5.0 branch. Discussion ---------- Update TypeHint Serializer.rst <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- d18a895 Update TypeHint Serializer.rst
2 parents 152ac71 + d18a895 commit 669b4f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ A custom name converter can handle such cases::
463463

464464
class OrgPrefixNameConverter implements NameConverterInterface
465465
{
466-
public function normalize($propertyName)
466+
public function normalize(string $propertyName)
467467
{
468468
return 'org_'.$propertyName;
469469
}
470470

471-
public function denormalize($propertyName)
471+
public function denormalize(string $propertyName)
472472
{
473473
// removes 'org_' prefix
474474
return 'org_' === substr($propertyName, 0, 4) ? substr($propertyName, 4) : $propertyName;

0 commit comments

Comments
 (0)