Skip to content

Commit 8bd8abf

Browse files
author
Wazabii
committed
Clean redundant code
1 parent e2fa0ad commit 8bd8abf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

EventHandler.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,14 @@ final protected function triggerEvents(): void
108108
if (is_null($this->event)) {
109109
throw new \Exception("Event has not been initiated", 1);
110110
}
111-
112-
113111
foreach ($this->event as $key => $event) {
114112
if (is_array($event)) {
115113
$select = key($event);
116-
if (isset($this->bindable[$select])) {
117-
$this->getEvent($event[$select]);
118-
}
114+
$this->getEvent($event[$select]);
119115
} else {
120116
$this->getEvent($event);
121117
}
122-
// Execute event once!
118+
// Stop propagate make sure event is executed once
123119
if ($this->stopPropagate) {
124120
unset($this->event[$key]);
125121
}

0 commit comments

Comments
 (0)