From 1b526800f08a44c8abeffb30ec878b72328d2899 Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 22 Nov 2022 11:25:11 +0700 Subject: [PATCH] Added note on package/class naming no issue - The name of the "StaffService" is ambiguous and too generic. Lack of good naming makes one to dig into the implementation details figuring out what the service does. - Should be named a more descriptive way --- ghost/staff-service/lib/staff-service.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ghost/staff-service/lib/staff-service.js b/ghost/staff-service/lib/staff-service.js index 324ce164bd..a93c921eaf 100644 --- a/ghost/staff-service/lib/staff-service.js +++ b/ghost/staff-service/lib/staff-service.js @@ -1,5 +1,7 @@ const {MemberCreatedEvent, SubscriptionCancelledEvent, SubscriptionCreatedEvent} = require('@tryghost/member-events'); +// @NOTE: 'StaffService' is a vague name that does not describe what it's actually doing. +// Possibly, "StaffNotificationService" or "StaffEventNotificationService" would be a more accurate name class StaffService { constructor({logging, models, mailer, settingsCache, settingsHelpers, urlUtils, DomainEvents}) { this.logging = logging;