From 1d55ea5a146ab840f2a8abf073a1fafb5da2aeab Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Wed, 14 Aug 2019 19:13:10 +0300 Subject: [PATCH] optimize get container extension --- src/GpsLabPaginationBundle.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/GpsLabPaginationBundle.php b/src/GpsLabPaginationBundle.php index 7f422bc..4a47aba 100644 --- a/src/GpsLabPaginationBundle.php +++ b/src/GpsLabPaginationBundle.php @@ -9,6 +9,7 @@ namespace GpsLab\Bundle\PaginationBundle; +use GpsLab\Bundle\PaginationBundle\DependencyInjection\GpsLabPaginationExtension; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; @@ -19,19 +20,6 @@ class GpsLabPaginationBundle extends Bundle */ public function getContainerExtension() { - if (null === $this->extension) { - $this->extension = false; - $class = $this->getContainerExtensionClass(); - - if (class_exists($class)) { - $extension = new $class(); - - if ($extension instanceof ExtensionInterface) { - $this->extension = $extension; - } - } - } - - return $this->extension ?: null; + return new GpsLabPaginationExtension(); } }