From 05a9e14913a62b0dda1f2b3606e4792c3f569adf Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 15 Oct 2012 12:27:24 +0200 Subject: [PATCH] Refactor for D.R.Y --- DependencyInjection/Compiler/PointcutMatchingPass.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/DependencyInjection/Compiler/PointcutMatchingPass.php b/DependencyInjection/Compiler/PointcutMatchingPass.php index faf6476..5cd149e 100644 --- a/DependencyInjection/Compiler/PointcutMatchingPass.php +++ b/DependencyInjection/Compiler/PointcutMatchingPass.php @@ -28,6 +28,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use JMS\AopBundle\Aop\PointcutInterface; +use CG\Core\ReflectionUtils; /** * Matches pointcuts against service methods. @@ -130,10 +131,7 @@ private function processDefinition(Definition $definition, $pointcuts, &$interce } $classAdvices = array(); - foreach ($class->getMethods(\ReflectionMethod::IS_PROTECTED | \ReflectionMethod::IS_PUBLIC) as $method) { - if ($method->isFinal()) { - continue; - } + foreach (ReflectionUtils::getOverrideableMethods($class) as $method) { if ('__construct' === $method->name) { continue;