Simplify the implementation of PhabricatorPolicyCapability subclasses

Summary: Instead of implementing the `getCapabilityKey` method in all subclasses of `PhabricatorPolicyCapability`, provide a `final` implementation in the base class which uses reflection. See D9837 and D9985 for similar implementations.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D10039
This commit is contained in:
Joshua Spence
2014-07-25 08:25:42 +10:00
parent c34de83619
commit b4d7a9de39
39 changed files with 24 additions and 150 deletions

View File

@@ -5,10 +5,6 @@ final class PhabricatorOAuthServerCreateClientsCapability
const CAPABILITY = 'oauthserver.create';
public function getCapabilityKey() {
return self::CAPABILITY;
}
public function getCapabilityName() {
return pht('Can Create OAuth Applications');
}