Skip to content

Commit dfbda13

Browse files
[Serializer] Add return hint
Return hint in NameConverterInterface added in V6.0
1 parent db90899 commit dfbda13

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
@@ -588,12 +588,12 @@ A custom name converter can handle such cases::
588588

589589
class OrgPrefixNameConverter implements NameConverterInterface
590590
{
591-
public function normalize(string $propertyName)
591+
public function normalize(string $propertyName): string
592592
{
593593
return 'org_'.$propertyName;
594594
}
595595

596-
public function denormalize(string $propertyName)
596+
public function denormalize(string $propertyName): string
597597
{
598598
// removes 'org_' prefix
599599
return 'org_' === substr($propertyName, 0, 4) ? substr($propertyName, 4) : $propertyName;

0 commit comments

Comments
 (0)