From bb5c7a8dd96661c04297d6eaec6f61426aef8dbf Mon Sep 17 00:00:00 2001 From: shitzuu Date: Wed, 14 Aug 2024 20:29:06 +0200 Subject: [PATCH] Fix code style inconsistencies --- dew-common/src/dev/shiza/dew/Dew.java | 8 +++----- dew-common/src/dev/shiza/dew/event/EventBus.java | 2 +- .../dev/shiza/dew/subscription/SubscriptionFacade.java | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dew-common/src/dev/shiza/dew/Dew.java b/dew-common/src/dev/shiza/dew/Dew.java index 2f2e2c6..5d581d7 100644 --- a/dew-common/src/dev/shiza/dew/Dew.java +++ b/dew-common/src/dev/shiza/dew/Dew.java @@ -1,15 +1,13 @@ package dev.shiza.dew; -import static dev.shiza.dew.event.EventBus.getEventBus; -import static dev.shiza.dew.subscription.SubscriptionFacade.getSubscriptionFacade; - import dev.shiza.dew.event.EventBus; +import dev.shiza.dew.subscription.SubscriptionFacade; public final class Dew { private Dew() {} - public static EventBus eventBus() { - return getEventBus(getSubscriptionFacade()); + public static EventBus create() { + return EventBus.create(SubscriptionFacade.create()); } } diff --git a/dew-common/src/dev/shiza/dew/event/EventBus.java b/dew-common/src/dev/shiza/dew/event/EventBus.java index 53618f8..c19223b 100644 --- a/dew-common/src/dev/shiza/dew/event/EventBus.java +++ b/dew-common/src/dev/shiza/dew/event/EventBus.java @@ -6,7 +6,7 @@ public sealed interface EventBus permits EventBusImpl { - static EventBus getEventBus(final SubscriptionFacade subscriptionFacade) { + static EventBus create(final SubscriptionFacade subscriptionFacade) { return new EventBusImpl(subscriptionFacade); } diff --git a/dew-common/src/dev/shiza/dew/subscription/SubscriptionFacade.java b/dew-common/src/dev/shiza/dew/subscription/SubscriptionFacade.java index 2cf3e66..3657614 100644 --- a/dew-common/src/dev/shiza/dew/subscription/SubscriptionFacade.java +++ b/dew-common/src/dev/shiza/dew/subscription/SubscriptionFacade.java @@ -6,7 +6,7 @@ public sealed interface SubscriptionFacade permits SubscriptionService { - static SubscriptionFacade getSubscriptionFacade() { + static SubscriptionFacade create() { return new SubscriptionService(new HashMap<>()); }