From a7317937e7fe08d01dfcdf18b86d64afd98bbee7 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 19 Mar 2016 12:50:41 +0100 Subject: [PATCH] Avoid a duplicate method call --- Doctrine/RouteConditionMetadataListener.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Doctrine/RouteConditionMetadataListener.php b/Doctrine/RouteConditionMetadataListener.php index 5d6d1b7b..ddfeaefe 100644 --- a/Doctrine/RouteConditionMetadataListener.php +++ b/Doctrine/RouteConditionMetadataListener.php @@ -49,12 +49,8 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) } $meta = $eventArgs->getClassMetadata(); - - if (null === $meta->getReflectionClass()) { - return; - } - - if ($meta->getReflectionClass()->getName() !== 'Symfony\Component\Routing\Route') { + $refl = $meta->getReflectionClass(); + if (null !== $refl && 'Symfony\Component\Routing\Route' !== $refl->getName()) { return; }