Skip to content

Commit

Permalink
inline extra method
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Jul 13, 2022
1 parent 4556854 commit f724487
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Maker/MakeSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,12 @@ 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);
}

return null;
}

private function getKernelEventsConstants(): array
{
return (new \ReflectionClass(KernelEvents::class))->getConstants();
}
}

0 comments on commit f724487

Please sign in to comment.