Skip to content

Commit 6f9d569

Browse files
committed
remove reference and garbage
1 parent 6f1787a commit 6f9d569

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/EventRegistry.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ public function __construct(EventDispatcherInterface $eventDispatcher)
8282
//Check if the new event classes exist, if so replace the old one with the new.
8383
if (isset(self::$eventsMap[$eventName]) && class_exists($newEventClass)) {
8484
self::$eventsMap[$eventName] = $newEventClass;
85-
// unset(self::$eventsMap[$eventName]);
86-
// self::$eventsMap[Str::getShortClassName($newEventClass)] = $newEventClass;
8785
}
8886
}
8987
}
@@ -164,8 +162,8 @@ public function getEventClassName(string $event)
164162

165163
public function listActiveEvents(array $events)
166164
{
167-
foreach ($events as &$event) {
168-
$event .= sprintf(' (<fg=yellow>%s</>)', self::$eventsMap[$event]);
165+
foreach ($events as $key => $event) {
166+
$events[$key] = sprintf('%s (<fg=yellow>%s</>)', $event, self::$eventsMap[$event]);
169167
}
170168

171169
return $events;

0 commit comments

Comments
 (0)