Skip to content

Commit 8710e97

Browse files
author
bdaler
committed
Style fix.
1 parent a791ef8 commit 8710e97

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Maker/MakeSubscriber.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
8989
$subscriberClassNameDetails->getFullName(),
9090
'event/Subscriber.tpl.php',
9191
[
92-
'event' => class_exists($event) ? sprintf('%s::class', $eventClassName) : $this->getEventConstant($event),
92+
'event' => class_exists($event) ? sprintf('%s::class', $eventClassName) : $this->getEventConstant($event),
9393
'import_constant_class' => $this->isNeedImportConstantsClass($event),
9494
'event_full_class_name' => $eventFullClassName,
9595
'event_arg' => $eventClassName ? sprintf('%s $event', $eventClassName) : '$event',
@@ -113,15 +113,14 @@ public function configureDependencies(DependencyBuilder $dependencies)
113113

114114
/**
115115
* @param $event
116-
* @return string
117116
*/
118117
private function getEventConstant($event): string
119118
{
120119
$constants = $this->getKernelEventsConstants();
121120

122121
foreach ($constants as $name => $value) {
123122
if ($value === $event) {
124-
return 'KernelEvents::' . $name;
123+
return 'KernelEvents::'.$name;
125124
}
126125
}
127126

@@ -130,7 +129,6 @@ private function getEventConstant($event): string
130129

131130
/**
132131
* @param $event
133-
* @return bool
134132
*/
135133
private function isNeedImportConstantsClass($event): bool
136134
{
@@ -145,12 +143,10 @@ private function isNeedImportConstantsClass($event): bool
145143
return false;
146144
}
147145

148-
/**
149-
* @return array
150-
*/
151146
private function getKernelEventsConstants(): array
152147
{
153148
$class = new \ReflectionClass(KernelEvents::class);
149+
154150
return $class->getConstants();
155151
}
156152
}

0 commit comments

Comments
 (0)