Page MenuHomePhabricator

Simplify the implementation of `PhabricatorPHIDType` subclasses
ClosedPublic

Authored by joshuaspence on Jul 19 2014, 6:35 AM.
Tags
None
Referenced Files
F18750924: D9985.id23994.diff
Sat, Oct 4, 9:17 AM
F18684460: D9985.diff
Fri, Sep 26, 9:35 AM
F18610712: D9985.id.diff
Sun, Sep 14, 5:22 AM
F18597287: D9985.diff
Sat, Sep 13, 2:31 AM
F18558085: D9985.id.diff
Sep 8 2025, 8:18 PM
F18515528: D9985.diff
Sep 5 2025, 11:20 AM
F18180162: D9985.id24031.diff
Aug 16 2025, 5:35 AM
F18153617: D9985.id23994.diff
Aug 14 2025, 7:47 PM

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).