From f72448761c0b29f24d731b397a6b25a619a7dc46 Mon Sep 17 00:00:00 2001 From: Jesse Rushlow Date: Wed, 13 Jul 2022 13:00:27 -0400 Subject: [PATCH] inline extra method --- src/Maker/MakeSubscriber.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Maker/MakeSubscriber.php b/src/Maker/MakeSubscriber.php index fd56df94d..9e3222fe3 100644 --- a/src/Maker/MakeSubscriber.php +++ b/src/Maker/MakeSubscriber.php @@ -127,7 +127,7 @@ public function configureDependencies(DependencyBuilder $dependencies): void private function getEventConstant(string $event): ?string { - $constants = $this->getKernelEventsConstants(); + $constants = (new \ReflectionClass(KernelEvents::class))->getConstants(); if (false !== ($name = array_search($event, $constants, true))) { return sprintf('KernelEvents::%s', $name); @@ -135,9 +135,4 @@ private function getEventConstant(string $event): ?string return null; } - - private function getKernelEventsConstants(): array - { - return (new \ReflectionClass(KernelEvents::class))->getConstants(); - } }