Right now, MentorManager is an interface. I believe it should be an abstract class instead, especially that in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/633776, I introduce MentorManager::getMentors that for all mentor managers I can imagine will just call array_unique(array_merge(MentorManager::getAvailableMentors(), MentorManager::getManuallyAssignedMentors()). This logic will be common to all implementers, so why bother writing it again and again?
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Rewrite MentorManager interface to an abstract class | mediawiki/extensions/GrowthExperiments | master | +16 -27 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Urbanecm_WMF | T266189 Refactor MentorManager to an abstract class | |||
Resolved | Urbanecm_WMF | T245639 Allow anyone to claim a mentee |
Event Timeline
Comment Actions
Could also be done with an interface + trait. Nothing wrong with changing it to an abstract class, of course.
Comment Actions
Change 636883 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] Rewrite MentorManager interface to an abstract class
Comment Actions
Change 636883 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Rewrite MentorManager interface to an abstract class