Page MenuHomePhabricator

Simplify the implementation of `PhabricatorPHIDType` subclasses
ClosedPublic

Authored by joshuaspence on Jul 19 2014, 6:35 AM.
Tags
None
Referenced Files
F14041807: D9985.id24031.diff
Mon, Nov 11, 9:48 PM
F14018478: D9985.id24031.diff
Tue, Nov 5, 1:51 PM
F14008918: D9985.id24031.diff
Wed, Oct 30, 7:59 AM
F14007578: D9985.id23994.diff
Tue, Oct 29, 8:19 AM
F14007577: D9985.id23995.diff
Tue, Oct 29, 8:19 AM
F14007576: D9985.id24031.diff
Tue, Oct 29, 8:19 AM
F13996344: D9985.id23994.diff
Wed, Oct 23, 8:19 PM
F13994585: D9985.id.diff
Wed, Oct 23, 7:12 AM

Details

Summary

Instead of implementing the getTypeConstant method in all subclasses of PhabricatorPHIDType, provide a final implementation in the base class which uses reflection. See D9837 for a similar implementation.

Test Plan

Ran arc unit.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Simplify the implementation of `PhabricatorPHIDType` subclasses.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence edited edge metadata.
  • Simplify conditional by using preg_match
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jul 21 2014, 2:03 PM
joshuaspence updated this revision to Diff 24031.

Closed by commit rP254542237a66 (authored by @joshuaspence).