Skip to content

Commit

Permalink
Use is_subclass_of instead of Reflection when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
GuilhemN committed Jan 16, 2016
1 parent 7d72f93 commit 51e3652
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -59,8 +59,6 @@ public function supportsNormalization($data, $format = null)
*/
public function supportsDenormalization($data, $type, $format = null)
{
$class = new \ReflectionClass($type);

return $class->isSubclassOf('Symfony\Component\Serializer\Normalizer\DenormalizableInterface');
return is_subclass_of($type, 'Symfony\Component\Serializer\Normalizer\DenormalizableInterface');
}
}

0 comments on commit 51e3652

Please sign in to comment.