Page MenuHomePhabricator

Refactor MentorManager to an abstract class
Closed, ResolvedPublic

Description

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?

Event Timeline

Could also be done with an interface + trait. Nothing wrong with changing it to an abstract class, of course.

Change 636883 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] Rewrite MentorManager interface to an abstract class

https://gerrit.wikimedia.org/r/636883

Change 636883 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Rewrite MentorManager interface to an abstract class

https://gerrit.wikimedia.org/r/636883