diff --git a/Annotation/Event.php b/Annotation/Event.php index 3775802b..def3c05e 100644 --- a/Annotation/Event.php +++ b/Annotation/Event.php @@ -37,7 +37,7 @@ use Snowflake\Event as SEvent; public function execute(mixed $class, mixed $method = null): bool { // TODO: Implement execute() method. - SEvent::on($this->name, [$class, $method], $this->params); + SEvent::on($this->name, [$class, $method]); return true; } diff --git a/System/Abstracts/BaseApplication.php b/System/Abstracts/BaseApplication.php index 082e0fb1..673c03c9 100644 --- a/System/Abstracts/BaseApplication.php +++ b/System/Abstracts/BaseApplication.php @@ -197,22 +197,22 @@ abstract class BaseApplication extends Service private function addEvent($key, $value): void { if ($value instanceof \Closure) { - Event::on($key, $value, [], true); + Event::on($key, $value, true); return; } if (is_object($value)) { - Event::on($key, $value, [], true); + Event::on($key, $value, true); return; } if (is_array($value)) { if (is_object($value[0]) && !($value[0] instanceof \Closure)) { - Event::on($key, $value, [], true); + Event::on($key, $value, true); return; } if (is_string($value[0])) { $value[0] = Snowflake::createObject($value[0]); - Event::on($key, $value, [], true); + Event::on($key, $value, true); return; } @@ -220,7 +220,7 @@ abstract class BaseApplication extends Service if (!is_callable($item, true)) { throw new InitException("Class does not hav callback."); } - Event::on($key, $item, [], true); + Event::on($key, $item, true); } }