Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18597287
D9985.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
33 KB
Referenced Files
None
Subscribers
None
D9985.diff
View Options
diff --git a/src/applications/auth/phid/PhabricatorAuthPHIDTypeAuthFactor.php b/src/applications/auth/phid/PhabricatorAuthPHIDTypeAuthFactor.php
--- a/src/applications/auth/phid/PhabricatorAuthPHIDTypeAuthFactor.php
+++ b/src/applications/auth/phid/PhabricatorAuthPHIDTypeAuthFactor.php
@@ -4,10 +4,6 @@
const TYPECONST = 'AFTR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Auth Factor');
}
diff --git a/src/applications/calendar/phid/PhabricatorCalendarPHIDTypeEvent.php b/src/applications/calendar/phid/PhabricatorCalendarPHIDTypeEvent.php
--- a/src/applications/calendar/phid/PhabricatorCalendarPHIDTypeEvent.php
+++ b/src/applications/calendar/phid/PhabricatorCalendarPHIDTypeEvent.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CEVT';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Event');
}
diff --git a/src/applications/config/phid/PhabricatorConfigPHIDTypeConfig.php b/src/applications/config/phid/PhabricatorConfigPHIDTypeConfig.php
--- a/src/applications/config/phid/PhabricatorConfigPHIDTypeConfig.php
+++ b/src/applications/config/phid/PhabricatorConfigPHIDTypeConfig.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CONF';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Config');
}
diff --git a/src/applications/conpherence/phid/PhabricatorConpherencePHIDTypeThread.php b/src/applications/conpherence/phid/PhabricatorConpherencePHIDTypeThread.php
--- a/src/applications/conpherence/phid/PhabricatorConpherencePHIDTypeThread.php
+++ b/src/applications/conpherence/phid/PhabricatorConpherencePHIDTypeThread.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CONP';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Conpherence Thread');
}
diff --git a/src/applications/countdown/phid/PhabricatorCountdownPHIDTypeCountdown.php b/src/applications/countdown/phid/PhabricatorCountdownPHIDTypeCountdown.php
--- a/src/applications/countdown/phid/PhabricatorCountdownPHIDTypeCountdown.php
+++ b/src/applications/countdown/phid/PhabricatorCountdownPHIDTypeCountdown.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CDWN';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Countdown');
}
diff --git a/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypeDashboard.php b/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypeDashboard.php
--- a/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypeDashboard.php
+++ b/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypeDashboard.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DSHB';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Dashboard');
}
diff --git a/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypePanel.php b/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypePanel.php
--- a/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypePanel.php
+++ b/src/applications/dashboard/phid/PhabricatorDashboardPHIDTypePanel.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DSHP';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Panel');
}
diff --git a/src/applications/differential/phid/DifferentialPHIDTypeDiff.php b/src/applications/differential/phid/DifferentialPHIDTypeDiff.php
--- a/src/applications/differential/phid/DifferentialPHIDTypeDiff.php
+++ b/src/applications/differential/phid/DifferentialPHIDTypeDiff.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DIFF';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Differential Diff');
}
diff --git a/src/applications/differential/phid/DifferentialPHIDTypeRevision.php b/src/applications/differential/phid/DifferentialPHIDTypeRevision.php
--- a/src/applications/differential/phid/DifferentialPHIDTypeRevision.php
+++ b/src/applications/differential/phid/DifferentialPHIDTypeRevision.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DREV';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Revision');
}
diff --git a/src/applications/diviner/phid/DivinerPHIDTypeAtom.php b/src/applications/diviner/phid/DivinerPHIDTypeAtom.php
--- a/src/applications/diviner/phid/DivinerPHIDTypeAtom.php
+++ b/src/applications/diviner/phid/DivinerPHIDTypeAtom.php
@@ -4,10 +4,6 @@
const TYPECONST = 'ATOM';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Atom');
}
diff --git a/src/applications/diviner/phid/DivinerPHIDTypeBook.php b/src/applications/diviner/phid/DivinerPHIDTypeBook.php
--- a/src/applications/diviner/phid/DivinerPHIDTypeBook.php
+++ b/src/applications/diviner/phid/DivinerPHIDTypeBook.php
@@ -4,10 +4,6 @@
const TYPECONST = 'BOOK';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Book');
}
diff --git a/src/applications/drydock/phid/DrydockPHIDTypeBlueprint.php b/src/applications/drydock/phid/DrydockPHIDTypeBlueprint.php
--- a/src/applications/drydock/phid/DrydockPHIDTypeBlueprint.php
+++ b/src/applications/drydock/phid/DrydockPHIDTypeBlueprint.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DRYB';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Blueprint');
}
diff --git a/src/applications/drydock/phid/DrydockPHIDTypeLease.php b/src/applications/drydock/phid/DrydockPHIDTypeLease.php
--- a/src/applications/drydock/phid/DrydockPHIDTypeLease.php
+++ b/src/applications/drydock/phid/DrydockPHIDTypeLease.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DRYL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Drydock Lease');
}
diff --git a/src/applications/drydock/phid/DrydockPHIDTypeResource.php b/src/applications/drydock/phid/DrydockPHIDTypeResource.php
--- a/src/applications/drydock/phid/DrydockPHIDTypeResource.php
+++ b/src/applications/drydock/phid/DrydockPHIDTypeResource.php
@@ -4,10 +4,6 @@
const TYPECONST = 'DRYR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Drydock Resource');
}
diff --git a/src/applications/files/phid/PhabricatorFilePHIDTypeFile.php b/src/applications/files/phid/PhabricatorFilePHIDTypeFile.php
--- a/src/applications/files/phid/PhabricatorFilePHIDTypeFile.php
+++ b/src/applications/files/phid/PhabricatorFilePHIDTypeFile.php
@@ -4,10 +4,6 @@
const TYPECONST = 'FILE';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('File');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuild.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuild.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuild.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuild.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMBD';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildItem.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildItem.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildItem.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildItem.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMBI';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build Item');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildLog.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildLog.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildLog.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildLog.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMCL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build Log');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildPlan.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildPlan.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildPlan.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildPlan.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMCP';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build Plan');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildStep.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildStep.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildStep.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildStep.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMCS';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build Step');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildTarget.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildTarget.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildTarget.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildTarget.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMBT';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Build Target');
}
diff --git a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildable.php b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildable.php
--- a/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildable.php
+++ b/src/applications/harbormaster/phid/HarbormasterPHIDTypeBuildable.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HMBB';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Buildable');
}
diff --git a/src/applications/herald/phid/HeraldPHIDTypeRule.php b/src/applications/herald/phid/HeraldPHIDTypeRule.php
--- a/src/applications/herald/phid/HeraldPHIDTypeRule.php
+++ b/src/applications/herald/phid/HeraldPHIDTypeRule.php
@@ -4,10 +4,6 @@
const TYPECONST = 'HRUL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Herald Rule');
}
diff --git a/src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php b/src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php
--- a/src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php
+++ b/src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php
@@ -4,10 +4,6 @@
const TYPECONST = 'LEGD';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Legalpad Document');
}
diff --git a/src/applications/macro/phid/PhabricatorMacroPHIDTypeMacro.php b/src/applications/macro/phid/PhabricatorMacroPHIDTypeMacro.php
--- a/src/applications/macro/phid/PhabricatorMacroPHIDTypeMacro.php
+++ b/src/applications/macro/phid/PhabricatorMacroPHIDTypeMacro.php
@@ -4,10 +4,6 @@
const TYPECONST = 'MCRO';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Image Macro');
}
diff --git a/src/applications/mailinglists/phid/PhabricatorMailingListPHIDTypeList.php b/src/applications/mailinglists/phid/PhabricatorMailingListPHIDTypeList.php
--- a/src/applications/mailinglists/phid/PhabricatorMailingListPHIDTypeList.php
+++ b/src/applications/mailinglists/phid/PhabricatorMailingListPHIDTypeList.php
@@ -4,10 +4,6 @@
const TYPECONST = 'MLST';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Mailing List');
}
diff --git a/src/applications/maniphest/phid/ManiphestPHIDTypeTask.php b/src/applications/maniphest/phid/ManiphestPHIDTypeTask.php
--- a/src/applications/maniphest/phid/ManiphestPHIDTypeTask.php
+++ b/src/applications/maniphest/phid/ManiphestPHIDTypeTask.php
@@ -4,10 +4,6 @@
const TYPECONST = 'TASK';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Task');
}
diff --git a/src/applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php b/src/applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php
--- a/src/applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php
+++ b/src/applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php
@@ -5,10 +5,6 @@
const TYPECONST = 'APPS';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Application');
}
diff --git a/src/applications/nuance/phid/NuancePHIDTypeItem.php b/src/applications/nuance/phid/NuancePHIDTypeItem.php
--- a/src/applications/nuance/phid/NuancePHIDTypeItem.php
+++ b/src/applications/nuance/phid/NuancePHIDTypeItem.php
@@ -1,14 +1,9 @@
<?php
-final class NuancePHIDTypeItem
- extends PhabricatorPHIDType {
+final class NuancePHIDTypeItem extends PhabricatorPHIDType {
const TYPECONST = 'NUAI';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Item');
}
diff --git a/src/applications/nuance/phid/NuancePHIDTypeQueue.php b/src/applications/nuance/phid/NuancePHIDTypeQueue.php
--- a/src/applications/nuance/phid/NuancePHIDTypeQueue.php
+++ b/src/applications/nuance/phid/NuancePHIDTypeQueue.php
@@ -5,10 +5,6 @@
const TYPECONST = 'NUAQ';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Queue');
}
diff --git a/src/applications/nuance/phid/NuancePHIDTypeRequestor.php b/src/applications/nuance/phid/NuancePHIDTypeRequestor.php
--- a/src/applications/nuance/phid/NuancePHIDTypeRequestor.php
+++ b/src/applications/nuance/phid/NuancePHIDTypeRequestor.php
@@ -1,14 +1,9 @@
<?php
-final class NuancePHIDTypeRequestor
- extends PhabricatorPHIDType {
+final class NuancePHIDTypeRequestor extends PhabricatorPHIDType {
const TYPECONST = 'NUAR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Requestor');
}
diff --git a/src/applications/nuance/phid/NuancePHIDTypeSource.php b/src/applications/nuance/phid/NuancePHIDTypeSource.php
--- a/src/applications/nuance/phid/NuancePHIDTypeSource.php
+++ b/src/applications/nuance/phid/NuancePHIDTypeSource.php
@@ -1,14 +1,9 @@
<?php
-final class NuancePHIDTypeSource
- extends PhabricatorPHIDType {
+final class NuancePHIDTypeSource extends PhabricatorPHIDType {
const TYPECONST = 'NUAS';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Source');
}
diff --git a/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClient.php b/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClient.php
--- a/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClient.php
+++ b/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClient.php
@@ -5,10 +5,6 @@
const TYPECONST = 'OASC';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('OAuth Application');
}
diff --git a/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClientAuthorization.php b/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClientAuthorization.php
--- a/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClientAuthorization.php
+++ b/src/applications/oauthserver/phid/PhabricatorOAuthServerPHIDTypeClientAuthorization.php
@@ -5,10 +5,6 @@
const TYPECONST = 'OASA';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('OAuth Authorization');
}
diff --git a/src/applications/owners/phid/PhabricatorOwnersPHIDTypePackage.php b/src/applications/owners/phid/PhabricatorOwnersPHIDTypePackage.php
--- a/src/applications/owners/phid/PhabricatorOwnersPHIDTypePackage.php
+++ b/src/applications/owners/phid/PhabricatorOwnersPHIDTypePackage.php
@@ -4,10 +4,6 @@
const TYPECONST = 'OPKG';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Owners Package');
}
diff --git a/src/applications/passphrase/phid/PassphrasePHIDTypeCredential.php b/src/applications/passphrase/phid/PassphrasePHIDTypeCredential.php
--- a/src/applications/passphrase/phid/PassphrasePHIDTypeCredential.php
+++ b/src/applications/passphrase/phid/PassphrasePHIDTypeCredential.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CDTL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Credential');
}
diff --git a/src/applications/paste/phid/PhabricatorPastePHIDTypePaste.php b/src/applications/paste/phid/PhabricatorPastePHIDTypePaste.php
--- a/src/applications/paste/phid/PhabricatorPastePHIDTypePaste.php
+++ b/src/applications/paste/phid/PhabricatorPastePHIDTypePaste.php
@@ -4,10 +4,6 @@
const TYPECONST = 'PSTE';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Paste');
}
diff --git a/src/applications/people/phid/PhabricatorPeoplePHIDTypeExternal.php b/src/applications/people/phid/PhabricatorPeoplePHIDTypeExternal.php
--- a/src/applications/people/phid/PhabricatorPeoplePHIDTypeExternal.php
+++ b/src/applications/people/phid/PhabricatorPeoplePHIDTypeExternal.php
@@ -4,10 +4,6 @@
const TYPECONST = 'XUSR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('External Account');
}
diff --git a/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php b/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php
--- a/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php
+++ b/src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php
@@ -4,10 +4,6 @@
const TYPECONST = 'USER';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('User');
}
diff --git a/src/applications/phame/phid/PhabricatorPhamePHIDTypeBlog.php b/src/applications/phame/phid/PhabricatorPhamePHIDTypeBlog.php
--- a/src/applications/phame/phid/PhabricatorPhamePHIDTypeBlog.php
+++ b/src/applications/phame/phid/PhabricatorPhamePHIDTypeBlog.php
@@ -4,10 +4,6 @@
const TYPECONST = 'BLOG';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Phame Blog');
}
diff --git a/src/applications/phame/phid/PhabricatorPhamePHIDTypePost.php b/src/applications/phame/phid/PhabricatorPhamePHIDTypePost.php
--- a/src/applications/phame/phid/PhabricatorPhamePHIDTypePost.php
+++ b/src/applications/phame/phid/PhabricatorPhamePHIDTypePost.php
@@ -4,10 +4,6 @@
const TYPECONST = 'POST';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Phame Post');
}
diff --git a/src/applications/phid/type/PhabricatorPHIDType.php b/src/applications/phid/type/PhabricatorPHIDType.php
--- a/src/applications/phid/type/PhabricatorPHIDType.php
+++ b/src/applications/phid/type/PhabricatorPHIDType.php
@@ -2,7 +2,28 @@
abstract class PhabricatorPHIDType {
- abstract public function getTypeConstant();
+ final public function getTypeConstant() {
+ $class = new ReflectionClass($this);
+
+ $const = $class->getConstant('TYPECONST');
+ if ($const === false) {
+ throw new Exception(
+ pht(
+ 'PHIDType class "%s" must define an TYPECONST property.',
+ get_class($this)));
+ }
+
+ if (!is_string($const) || !preg_match('/^[A-Z]{4}$/', $const)) {
+ throw new Exception(
+ pht(
+ 'PHIDType class "%s" has an invalid TYPECONST property. PHID '.
+ 'constants must be a four character uppercase string.',
+ get_class($this)));
+ }
+
+ return $const;
+ }
+
abstract public function getTypeName();
public function newObject() {
diff --git a/src/applications/phlux/phid/PhluxPHIDTypeVariable.php b/src/applications/phlux/phid/PhluxPHIDTypeVariable.php
--- a/src/applications/phlux/phid/PhluxPHIDTypeVariable.php
+++ b/src/applications/phlux/phid/PhluxPHIDTypeVariable.php
@@ -4,10 +4,6 @@
const TYPECONST = 'PVAR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Variable');
}
diff --git a/src/applications/pholio/phid/PholioPHIDTypeImage.php b/src/applications/pholio/phid/PholioPHIDTypeImage.php
--- a/src/applications/pholio/phid/PholioPHIDTypeImage.php
+++ b/src/applications/pholio/phid/PholioPHIDTypeImage.php
@@ -4,10 +4,6 @@
const TYPECONST = 'PIMG';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Image');
}
diff --git a/src/applications/pholio/phid/PholioPHIDTypeMock.php b/src/applications/pholio/phid/PholioPHIDTypeMock.php
--- a/src/applications/pholio/phid/PholioPHIDTypeMock.php
+++ b/src/applications/pholio/phid/PholioPHIDTypeMock.php
@@ -4,10 +4,6 @@
const TYPECONST = 'MOCK';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Mock');
}
diff --git a/src/applications/phragment/phid/PhragmentPHIDTypeFragment.php b/src/applications/phragment/phid/PhragmentPHIDTypeFragment.php
--- a/src/applications/phragment/phid/PhragmentPHIDTypeFragment.php
+++ b/src/applications/phragment/phid/PhragmentPHIDTypeFragment.php
@@ -1,14 +1,9 @@
<?php
-final class PhragmentPHIDTypeFragment
- extends PhabricatorPHIDType {
+final class PhragmentPHIDTypeFragment extends PhabricatorPHIDType {
const TYPECONST = 'PHRF';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Fragment');
}
diff --git a/src/applications/phragment/phid/PhragmentPHIDTypeFragmentVersion.php b/src/applications/phragment/phid/PhragmentPHIDTypeFragmentVersion.php
--- a/src/applications/phragment/phid/PhragmentPHIDTypeFragmentVersion.php
+++ b/src/applications/phragment/phid/PhragmentPHIDTypeFragmentVersion.php
@@ -1,14 +1,9 @@
<?php
-final class PhragmentPHIDTypeFragmentVersion
- extends PhabricatorPHIDType {
+final class PhragmentPHIDTypeFragmentVersion extends PhabricatorPHIDType {
const TYPECONST = 'PHRV';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Fragment Version');
}
diff --git a/src/applications/phragment/phid/PhragmentPHIDTypeSnapshot.php b/src/applications/phragment/phid/PhragmentPHIDTypeSnapshot.php
--- a/src/applications/phragment/phid/PhragmentPHIDTypeSnapshot.php
+++ b/src/applications/phragment/phid/PhragmentPHIDTypeSnapshot.php
@@ -1,14 +1,9 @@
<?php
-final class PhragmentPHIDTypeSnapshot
- extends PhabricatorPHIDType {
+final class PhragmentPHIDTypeSnapshot extends PhabricatorPHIDType {
const TYPECONST = 'PHRS';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Snapshot');
}
diff --git a/src/applications/phriction/phid/PhrictionPHIDTypeDocument.php b/src/applications/phriction/phid/PhrictionPHIDTypeDocument.php
--- a/src/applications/phriction/phid/PhrictionPHIDTypeDocument.php
+++ b/src/applications/phriction/phid/PhrictionPHIDTypeDocument.php
@@ -4,10 +4,6 @@
const TYPECONST = 'WIKI';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Wiki Document');
}
diff --git a/src/applications/policy/phid/PhabricatorPolicyPHIDTypePolicy.php b/src/applications/policy/phid/PhabricatorPolicyPHIDTypePolicy.php
--- a/src/applications/policy/phid/PhabricatorPolicyPHIDTypePolicy.php
+++ b/src/applications/policy/phid/PhabricatorPolicyPHIDTypePolicy.php
@@ -1,14 +1,9 @@
<?php
-final class PhabricatorPolicyPHIDTypePolicy
- extends PhabricatorPHIDType {
+final class PhabricatorPolicyPHIDTypePolicy extends PhabricatorPHIDType {
const TYPECONST = 'PLCY';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Policy');
}
diff --git a/src/applications/ponder/phid/PonderPHIDTypeAnswer.php b/src/applications/ponder/phid/PonderPHIDTypeAnswer.php
--- a/src/applications/ponder/phid/PonderPHIDTypeAnswer.php
+++ b/src/applications/ponder/phid/PonderPHIDTypeAnswer.php
@@ -4,10 +4,6 @@
const TYPECONST = 'ANSW';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Answer');
}
diff --git a/src/applications/ponder/phid/PonderPHIDTypeQuestion.php b/src/applications/ponder/phid/PonderPHIDTypeQuestion.php
--- a/src/applications/ponder/phid/PonderPHIDTypeQuestion.php
+++ b/src/applications/ponder/phid/PonderPHIDTypeQuestion.php
@@ -4,10 +4,6 @@
const TYPECONST = 'QUES';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Question');
}
diff --git a/src/applications/project/phid/PhabricatorProjectPHIDTypeColumn.php b/src/applications/project/phid/PhabricatorProjectPHIDTypeColumn.php
--- a/src/applications/project/phid/PhabricatorProjectPHIDTypeColumn.php
+++ b/src/applications/project/phid/PhabricatorProjectPHIDTypeColumn.php
@@ -4,10 +4,6 @@
const TYPECONST = 'PCOL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Project Column');
}
diff --git a/src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php b/src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php
--- a/src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php
+++ b/src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php
@@ -4,10 +4,6 @@
const TYPECONST = 'PROJ';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Project');
}
diff --git a/src/applications/releeph/phid/ReleephPHIDTypeBranch.php b/src/applications/releeph/phid/ReleephPHIDTypeBranch.php
--- a/src/applications/releeph/phid/ReleephPHIDTypeBranch.php
+++ b/src/applications/releeph/phid/ReleephPHIDTypeBranch.php
@@ -4,10 +4,6 @@
const TYPECONST = 'REBR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Releeph Branch');
}
diff --git a/src/applications/releeph/phid/ReleephPHIDTypeProduct.php b/src/applications/releeph/phid/ReleephPHIDTypeProduct.php
--- a/src/applications/releeph/phid/ReleephPHIDTypeProduct.php
+++ b/src/applications/releeph/phid/ReleephPHIDTypeProduct.php
@@ -4,10 +4,6 @@
const TYPECONST = 'REPR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Releeph Product');
}
diff --git a/src/applications/releeph/phid/ReleephPHIDTypeRequest.php b/src/applications/releeph/phid/ReleephPHIDTypeRequest.php
--- a/src/applications/releeph/phid/ReleephPHIDTypeRequest.php
+++ b/src/applications/releeph/phid/ReleephPHIDTypeRequest.php
@@ -4,10 +4,6 @@
const TYPECONST = 'RERQ';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Releeph Request');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeArcanistProject.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeArcanistProject.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeArcanistProject.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeArcanistProject.php
@@ -5,10 +5,6 @@
const TYPECONST = 'APRJ';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Arcanist Project');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeCommit.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeCommit.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeCommit.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeCommit.php
@@ -4,10 +4,6 @@
const TYPECONST = 'CMIT';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Commit');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeMirror.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeMirror.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeMirror.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeMirror.php
@@ -1,14 +1,9 @@
<?php
-final class PhabricatorRepositoryPHIDTypeMirror
- extends PhabricatorPHIDType {
+final class PhabricatorRepositoryPHIDTypeMirror extends PhabricatorPHIDType {
const TYPECONST = 'RMIR';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Repository Mirror');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushEvent.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushEvent.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushEvent.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushEvent.php
@@ -1,14 +1,9 @@
<?php
-final class PhabricatorRepositoryPHIDTypePushEvent
- extends PhabricatorPHIDType {
+final class PhabricatorRepositoryPHIDTypePushEvent extends PhabricatorPHIDType {
const TYPECONST = 'PSHE';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Push Event');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushLog.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushLog.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushLog.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypePushLog.php
@@ -1,14 +1,9 @@
<?php
-final class PhabricatorRepositoryPHIDTypePushLog
- extends PhabricatorPHIDType {
+final class PhabricatorRepositoryPHIDTypePushLog extends PhabricatorPHIDType {
const TYPECONST = 'PSHL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Push Log');
}
diff --git a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeRepository.php b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeRepository.php
--- a/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeRepository.php
+++ b/src/applications/repository/phid/PhabricatorRepositoryPHIDTypeRepository.php
@@ -5,10 +5,6 @@
const TYPECONST = 'REPO';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Repository');
}
diff --git a/src/applications/slowvote/phid/PhabricatorSlowvotePHIDTypePoll.php b/src/applications/slowvote/phid/PhabricatorSlowvotePHIDTypePoll.php
--- a/src/applications/slowvote/phid/PhabricatorSlowvotePHIDTypePoll.php
+++ b/src/applications/slowvote/phid/PhabricatorSlowvotePHIDTypePoll.php
@@ -4,10 +4,6 @@
const TYPECONST = 'POLL';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Slowvote Poll');
}
diff --git a/src/applications/tokens/phid/PhabricatorTokenPHIDTypeToken.php b/src/applications/tokens/phid/PhabricatorTokenPHIDTypeToken.php
--- a/src/applications/tokens/phid/PhabricatorTokenPHIDTypeToken.php
+++ b/src/applications/tokens/phid/PhabricatorTokenPHIDTypeToken.php
@@ -4,10 +4,6 @@
const TYPECONST = 'TOKN';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Token');
}
diff --git a/src/applications/transactions/phid/PhabricatorApplicationTransactionPHIDTypeTransaction.php b/src/applications/transactions/phid/PhabricatorApplicationTransactionPHIDTypeTransaction.php
--- a/src/applications/transactions/phid/PhabricatorApplicationTransactionPHIDTypeTransaction.php
+++ b/src/applications/transactions/phid/PhabricatorApplicationTransactionPHIDTypeTransaction.php
@@ -5,10 +5,6 @@
const TYPECONST = 'XACT';
- public function getTypeConstant() {
- return self::TYPECONST;
- }
-
public function getTypeName() {
return pht('Transaction');
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 14, 2:31 AM (3 w, 4 d ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/nr/i7/szjmpp6dhtpm4g3m
Default Alt Text
D9985.diff (33 KB)
Attached To
Mode
D9985: Simplify the implementation of `PhabricatorPHIDType` subclasses
Attached
Detach File
Event Timeline
Log In to Comment