Skip to content

Commit e60af9d

Browse files
committed
Use is_subclass_of instead of Reflection when possible
1 parent 61505e6 commit e60af9d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 3 deletions
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)