Skip to content

Commit d18a895

Browse files
authored
Update TypeHint Serializer.rst
1 parent 30a896a commit d18a895

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)