8000 Use is_subclass_of instead of Reflection when possible · symfony/symfony@51e3652 · GitHub
[go: up one dir, main page]

Skip to content

Commit 51e3652

Browse files
committed
Use is_subclass_of instead of Reflection when possible
1 parent 7d72f93 commit 51e3652

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 3 deletions
4D2F
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public function supportsNormalization($data, $format = null)
5959
*/
6060
public function supportsDenormalization($data, $type, $format = null)
6161
{
62-
$class = new \ReflectionClass($type);
63-
64-
return $class->isSubclassOf('Symfony\Component\Serializer\Normalizer\DenormalizableInterface');
62+
return is_subclass_of($type, 'Symfony\Component\Serializer\Normalizer\DenormalizableInterface');
6563
}
6664
}

0 commit comments

Comments
 (0)
0