Skip to content

Commit 95f77df

Browse files
authored
refactor: lowercase event name calling twice
1 parent 686e9ae commit 95f77df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

system/Events/Events.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public static function trigger($eventName, ...$arguments): bool
147147
static::initialize();
148148
}
149149

150-
$listeners = static::listeners($eventName);
150+
$listeners = static::listeners($eventName);
151+
$lowerEventName = strtolower($eventName);
151152

152153
foreach ($listeners as $listener) {
153154
$start = microtime(true);
@@ -158,7 +159,7 @@ public static function trigger($eventName, ...$arguments): bool
158159
static::$performanceLog[] = [
159160
'start' => $start,
160161
'end' => microtime(true),
161-
'event' => strtolower($eventName),
162+
'event' => $lowerEventName,
162163
];
163164
}
164165

0 commit comments

Comments
 (0)