From b2b739c709aaa299c1e6897ced7ab7dbe66c872d Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 16 Jul 2015 14:11:44 -0700 Subject: [PATCH] Reduce code duplication in Herald fields Summary: Ref T8726. I want to modularize values and reduce how hard-coded / copypasta'd they are. - Rename `get...StandardCondition()` to `get...StandardType()`, since we can drive both conditions and values from it. - Rename `STANDARD_LIST` to `STANDARD_PHID_LIST` for consistency: all "lists" are lists of PHIDs. - For all standard types which don't require typehaeads, lift their logic into the base class. - I'll lift typeaheads soon, but need to generalize them first. Test Plan: Edited various Herald rules, saw value UI generate correctly. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8726 Differential Revision: https://secure.phabricator.com/D13612 --- ...fferentialDiffAffectedFilesHeraldField.php | 12 +---- .../DifferentialDiffAuthorHeraldField.php | 2 +- ...ferentialDiffAuthorProjectsHeraldField.php | 4 +- ...ifferentialDiffContentAddedHeraldField.php | 6 +-- .../DifferentialDiffContentHeraldField.php | 6 +-- ...ferentialDiffContentRemovedHeraldField.php | 6 +-- .../DifferentialDiffRepositoryHeraldField.php | 2 +- ...ntialDiffRepositoryProjectsHeraldField.php | 4 +- ...entialRevisionAffectedFilesHeraldField.php | 12 +---- .../DifferentialRevisionAuthorHeraldField.php | 2 +- ...ntialRevisionAuthorProjectsHeraldField.php | 4 +- ...rentialRevisionContentAddedHeraldField.php | 6 +-- ...DifferentialRevisionContentHeraldField.php | 6 +-- ...ntialRevisionContentRemovedHeraldField.php | 6 +-- ...DifferentialRevisionPackageHeraldField.php | 4 +- ...rentialRevisionPackageOwnerHeraldField.php | 4 +- ...ferentialRevisionRepositoryHeraldField.php | 2 +- ...lRevisionRepositoryProjectsHeraldField.php | 4 +- ...fferentialRevisionReviewersHeraldField.php | 4 +- ...DifferentialRevisionSummaryHeraldField.php | 6 +-- .../DifferentialRevisionTitleHeraldField.php | 6 +-- ...iffusionCommitAffectedFilesHeraldField.php | 6 +-- .../DiffusionCommitAuthorHeraldField.php | 2 +- .../DiffusionCommitBranchesHeraldField.php | 6 +-- .../DiffusionCommitCommitterHeraldField.php | 2 +- ...usionCommitDiffContentAddedHeraldField.php | 6 +-- .../DiffusionCommitDiffContentHeraldField.php | 6 +-- ...ionCommitDiffContentRemovedHeraldField.php | 6 +-- ...DiffusionCommitDiffEnormousHeraldField.php | 6 +-- .../DiffusionCommitMessageHeraldField.php | 6 +-- ...DiffusionCommitPackageAuditHeraldField.php | 4 +- .../DiffusionCommitPackageHeraldField.php | 4 +- ...DiffusionCommitPackageOwnerHeraldField.php | 4 +- .../DiffusionCommitRepositoryHeraldField.php | 2 +- ...ionCommitRepositoryProjectsHeraldField.php | 4 +- .../DiffusionCommitReviewerHeraldField.php | 2 +- ...usionCommitRevisionAcceptedHeraldField.php | 6 +-- .../DiffusionCommitRevisionHeraldField.php | 6 +-- ...sionCommitRevisionReviewersHeraldField.php | 4 +- ...onCommitRevisionSubscribersHeraldField.php | 4 +- ...eCommitContentAffectedFilesHeraldField.php | 6 +-- ...usionPreCommitContentAuthorHeraldField.php | 2 +- ...onPreCommitContentAuthorRawHeraldField.php | 6 +-- ...ionPreCommitContentBranchesHeraldField.php | 6 +-- ...onPreCommitContentCommitterHeraldField.php | 2 +- ...reCommitContentCommitterRawHeraldField.php | 6 +-- ...mmitContentDiffContentAddedHeraldField.php | 6 +-- ...PreCommitContentDiffContentHeraldField.php | 6 +-- ...itContentDiffContentRemovedHeraldField.php | 6 +-- ...reCommitContentDiffEnormousHeraldField.php | 6 +-- ...fusionPreCommitContentMergeHeraldField.php | 6 +-- ...sionPreCommitContentMessageHeraldField.php | 6 +-- ...usionPreCommitContentPusherHeraldField.php | 2 +- ...mitContentPusherIsCommitterHeraldField.php | 6 +-- ...CommitContentPusherProjectsHeraldField.php | 4 +- ...nPreCommitContentRepositoryHeraldField.php | 2 +- ...itContentRepositoryProjectsHeraldField.php | 4 +- ...mmitContentRevisionAcceptedHeraldField.php | 6 +-- ...ionPreCommitContentRevisionHeraldField.php | 6 +-- ...mitContentRevisionReviewersHeraldField.php | 4 +- ...tContentRevisionSubscribersHeraldField.php | 4 +- .../DiffusionPreCommitRefNameHeraldField.php | 6 +-- ...DiffusionPreCommitRefPusherHeraldField.php | 2 +- ...nPreCommitRefPusherProjectsHeraldField.php | 4 +- ...usionPreCommitRefRepositoryHeraldField.php | 2 +- ...CommitRefRepositoryProjectsHeraldField.php | 4 +- src/applications/herald/field/HeraldField.php | 52 +++++++++++++------ .../herald/field/HeraldNewObjectField.php | 6 +-- .../ManiphestTaskAssigneeHeraldField.php | 2 +- .../herald/ManiphestTaskAuthorHeraldField.php | 2 +- .../ManiphestTaskDescriptionHeraldField.php | 6 +-- .../ManiphestTaskPriorityHeraldField.php | 2 +- .../herald/ManiphestTaskStatusHeraldField.php | 2 +- .../herald/ManiphestTaskTitleHeraldField.php | 6 +-- ...atorMetaMTAApplicationEmailHeraldField.php | 4 +- .../herald/PholioMockAuthorHeraldField.php | 2 +- .../PholioMockDescriptionHeraldField.php | 6 +-- .../herald/PholioMockNameHeraldField.php | 6 +-- .../PhrictionDocumentAuthorHeraldField.php | 2 +- .../PhrictionDocumentContentHeraldField.php | 6 +-- .../PhrictionDocumentPathHeraldField.php | 6 +-- .../PhrictionDocumentTitleHeraldField.php | 6 +-- .../project/herald/HeraldProjectsField.php | 4 +- .../spaces/herald/HeraldSpaceField.php | 2 +- .../herald/HeraldSubscribersField.php | 4 +- 85 files changed, 143 insertions(+), 297 deletions(-) diff --git a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php index d176849621..1552ed300c 100644 --- a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php @@ -13,18 +13,8 @@ final class DifferentialDiffAffectedFilesHeraldField return $this->getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - switch ($condition) { - case HeraldAdapter::CONDITION_EXISTS: - case HeraldAdapter::CONDITION_NOT_EXISTS: - return HeraldAdapter::VALUE_NONE; - default: - return HeraldAdapter::VALUE_TEXT; - } - } - } diff --git a/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php index 859ec13499..b1f081fc4f 100644 --- a/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php @@ -13,7 +13,7 @@ final class DifferentialDiffAuthorHeraldField return $object->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php index 304fff9463..5f170ece31 100644 --- a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DifferentialDiffAuthorProjectsHeraldField PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php index 325c4e4719..ddac2cab68 100644 --- a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialDiffContentAddedHeraldField return $this->getAdapter()->loadAddedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php index c753ef14fb..3ded4b5a64 100644 --- a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialDiffContentHeraldField return $this->getAdapter()->loadContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php index 12c294f6b5..03bd61ec02 100644 --- a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialDiffContentRemovedHeraldField return $this->getAdapter()->loadRemovedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php b/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php index 4494d6fece..38fc552d66 100644 --- a/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php @@ -19,7 +19,7 @@ final class DifferentialDiffRepositoryHeraldField return $repository->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php index 6453a170b8..2fac95641d 100644 --- a/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php @@ -20,8 +20,8 @@ final class DifferentialDiffRepositoryProjectsHeraldField PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php index c39d852fc0..6cfc29b8fd 100644 --- a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php @@ -13,18 +13,8 @@ final class DifferentialRevisionAffectedFilesHeraldField return $this->getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - switch ($condition) { - case HeraldAdapter::CONDITION_EXISTS: - case HeraldAdapter::CONDITION_NOT_EXISTS: - return HeraldAdapter::VALUE_NONE; - default: - return HeraldAdapter::VALUE_TEXT; - } - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php index eb23c2a4ac..b2f119cc6c 100644 --- a/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php @@ -13,7 +13,7 @@ final class DifferentialRevisionAuthorHeraldField return $object->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php index e50a8b3f85..d02a7c296b 100644 --- a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DifferentialRevisionAuthorProjectsHeraldField PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php index fcab6b66c4..03cd012dea 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialRevisionContentAddedHeraldField return $this->getAdapter()->loadAddedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php index 42f84665a0..6c2e7460a6 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialRevisionContentHeraldField return $this->getAdapter()->loadContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php index 73017c3925..dd9fc8ea3a 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialRevisionContentRemovedHeraldField return $this->getAdapter()->loadRemovedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php index b056cf7387..e788d9e612 100644 --- a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php @@ -14,8 +14,8 @@ final class DifferentialRevisionPackageHeraldField return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php index 89e2383e47..ef8b7b2899 100644 --- a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php @@ -19,8 +19,8 @@ final class DifferentialRevisionPackageOwnerHeraldField return mpull($owners, 'getUserPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php b/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php index 00d0575ed1..561d0ff15b 100644 --- a/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php @@ -19,7 +19,7 @@ final class DifferentialRevisionRepositoryHeraldField return $repository->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php index 948a7eb2ea..bdf8ecd8c5 100644 --- a/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php @@ -20,8 +20,8 @@ final class DifferentialRevisionRepositoryProjectsHeraldField PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php b/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php index 57ae95de03..e8ca0f4109 100644 --- a/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php @@ -13,8 +13,8 @@ final class DifferentialRevisionReviewersHeraldField return $this->getAdapter()->loadReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php b/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php index e0d0cd7ccf..eafc9bc990 100644 --- a/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php @@ -16,12 +16,8 @@ final class DifferentialRevisionSummaryHeraldField return $object->getSummary()."\n\n".$object->getTestPlan(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php b/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php index 5e7eecd515..f39742d2d7 100644 --- a/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php @@ -13,12 +13,8 @@ final class DifferentialRevisionTitleHeraldField return $object->getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php index 2720516898..bc5855c3e4 100644 --- a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitAffectedFilesHeraldField return $this->getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php index f5a52bbe13..1547253d40 100644 --- a/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionCommitAuthorHeraldField return $object->getCommitData()->getCommitDetail('authorPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php index 4401974f71..dec0a05f0d 100644 --- a/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php @@ -27,12 +27,8 @@ final class DiffusionCommitBranchesHeraldField return mpull($refs, 'getShortName'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php index 715b1c6139..06fbc6c9c5 100644 --- a/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionCommitCommitterHeraldField return $object->getCommitData()->getCommitDetail('committerPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php index 9efeacd87c..cd7bf4cc30 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitDiffContentAddedHeraldField return $this->getAdapter()->loadDiffContent('+'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php index 7b1265fb18..d78e95f319 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitDiffContentHeraldField return $this->getAdapter()->loadDiffContent('*'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php index 371f8edf9f..4bb36ed4ef 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitDiffContentRemovedHeraldField return $this->getAdapter()->loadDiffContent('-'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php index 587ad70c7e..2e3b91b0d6 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitDiffEnormousHeraldField return $this->getAdapter()->isDiffEnormous(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php index b1ab512bcc..f2b9ed241f 100644 --- a/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionCommitMessageHeraldField return $object->getCommitData()->getCommitMessage(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php index 2277dadafe..ce1d19a699 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php @@ -18,8 +18,8 @@ final class DiffusionCommitPackageAuditHeraldField return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php index 9a0ebc52e0..01f117ef3d 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php @@ -14,8 +14,8 @@ final class DiffusionCommitPackageHeraldField return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php index 917afe58fe..bd98aec032 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php @@ -20,8 +20,8 @@ final class DiffusionCommitPackageOwnerHeraldField return mpull($owners, 'getUserPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php index a26fccb1d5..88da8c7403 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionCommitRepositoryHeraldField return $object->getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php index 19a84dfe88..7f71d063ee 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DiffusionCommitRepositoryProjectsHeraldField PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php index 8eafdc2fc2..2f67070f52 100644 --- a/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionCommitReviewerHeraldField return $object->getCommitData()->getCommitDetail('reviewerPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php index e518767338..cb5b449989 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php @@ -29,12 +29,8 @@ final class DiffusionCommitRevisionAcceptedHeraldField return null; } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php index 75f1a5dfb8..5e51e86639 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php @@ -19,12 +19,8 @@ final class DiffusionCommitRevisionHeraldField return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php index 6385a095e0..f9febc72cd 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php @@ -19,8 +19,8 @@ final class DiffusionCommitRevisionReviewersHeraldField return $revision->getReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php index 9ea9f27aaa..1d235c9a3d 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php @@ -20,8 +20,8 @@ final class DiffusionCommitRevisionSubscribersHeraldField return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php index 97a89b8422..bef87ce4ba 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentAffectedFilesHeraldField return $this->getAdapter()->getDiffContent('name'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php index 50a55a043c..ae9c725e9b 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitContentAuthorHeraldField return $this->getAdapter()->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php index 502eb1f0c4..80429810e7 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentAuthorRawHeraldField return $this->getAdapter()->getAuthorRaw(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php index e64c2afaf3..09e46083c8 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentBranchesHeraldField return $this->getAdapter()->getBranches(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php index 0f7c6543d3..8682c9895f 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitContentCommitterHeraldField return $this->getAdapter()->getCommitterPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php index fe9743317f..a51804ceb1 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentCommitterRawHeraldField return $this->getAdapter()->getCommitterRaw(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php index 1fa54c2fa8..46b4a2c3c0 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentDiffContentAddedHeraldField return $this->getAdapter()->getDiffContent('+'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php index 6e7419a5f6..db33589acb 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentDiffContentHeraldField return $this->getAdapter()->getDiffContent('*'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php index 72e044e23a..1ae34c29c4 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentDiffContentRemovedHeraldField return $this->getAdapter()->getDiffContent('-'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php index d496dea3a1..d56018d73c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentDiffEnormousHeraldField return $this->getAdapter()->isDiffEnormous(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php index cc60173710..fbafae4f4a 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentMergeHeraldField return $this->getAdapter()->getIsMergeCommit(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php index e1ad9e59d4..27aff5b5c2 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitContentMessageHeraldField return $this->getAdapter()->getCommitRef()->getMessage(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php index 657c2a34c5..ec61cd3efb 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitContentPusherHeraldField return $this->getAdapter()->getHookEngine()->getViewer()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php index 4904b6f39f..4c88955da5 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php @@ -16,12 +16,8 @@ final class DiffusionPreCommitContentPusherIsCommitterHeraldField return ($pusher === $committer); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php index 61d3e06009..78f5500312 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DiffusionPreCommitContentPusherProjectsHeraldField ->loadViewerProjectPHIDsForHerald(); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php index c789b3e766..66352b4743 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitContentRepositoryHeraldField return $this->getAdapter()->getHookEngine()->getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php index 6053b92d9d..4e9d9977ad 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DiffusionPreCommitContentRepositoryProjectsHeraldField PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php index e060f7d1c8..90b0b48b1c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php @@ -24,12 +24,8 @@ final class DiffusionPreCommitContentRevisionAcceptedHeraldField return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php index 665d72f9d0..703c5aa95a 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php @@ -19,12 +19,8 @@ final class DiffusionPreCommitContentRevisionHeraldField return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php index c24751c3ea..7fc9a0e910 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php @@ -19,8 +19,8 @@ final class DiffusionPreCommitContentRevisionReviewersHeraldField return $revision->getReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php index 0aaa043b5a..711b88e372 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php @@ -20,8 +20,8 @@ final class DiffusionPreCommitContentRevisionSubscribersHeraldField return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php index 28711a1b3e..c21a73adb7 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php @@ -13,12 +13,8 @@ final class DiffusionPreCommitRefNameHeraldField return $object->getRefName(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php index b34cb6f236..dae97328a9 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitRefPusherHeraldField return $this->getAdapter()->getHookEngine()->getViewer()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php index c77d63a7d8..b71e672c7f 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DiffusionPreCommitRefPusherProjectsHeraldField ->loadViewerProjectPHIDsForHerald(); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php index 9b850c6847..e3c27890fa 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php @@ -13,7 +13,7 @@ final class DiffusionPreCommitRefRepositoryHeraldField return $this->getAdapter()->getHookEngine()->getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php index f91d1abd14..e5a90180b6 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php @@ -15,8 +15,8 @@ final class DiffusionPreCommitRefRepositoryProjectsHeraldField PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/herald/field/HeraldField.php b/src/applications/herald/field/HeraldField.php index 64d4c645ba..82c783972e 100644 --- a/src/applications/herald/field/HeraldField.php +++ b/src/applications/herald/field/HeraldField.php @@ -4,28 +4,25 @@ abstract class HeraldField extends Phobject { private $adapter; - const STANDARD_LIST = 'standard.list'; const STANDARD_BOOL = 'standard.bool'; const STANDARD_TEXT = 'standard.text'; const STANDARD_TEXT_LIST = 'standard.text.list'; const STANDARD_TEXT_MAP = 'standard.text.map'; const STANDARD_PHID = 'standard.phid'; + const STANDARD_PHID_LIST = 'standard.phid.list'; const STANDARD_PHID_BOOL = 'standard.phid.bool'; const STANDARD_PHID_NULLABLE = 'standard.phid.nullable'; abstract public function getHeraldFieldName(); abstract public function getHeraldFieldValue($object); + protected function getHeraldFieldStandardType() { + throw new PhutilMethodNotImplementedException(); + } + public function getHeraldFieldConditions() { - switch ($this->getHeraldFieldStandardConditions()) { - case self::STANDARD_LIST: - return array( - HeraldAdapter::CONDITION_INCLUDE_ALL, - HeraldAdapter::CONDITION_INCLUDE_ANY, - HeraldAdapter::CONDITION_INCLUDE_NONE, - HeraldAdapter::CONDITION_EXISTS, - HeraldAdapter::CONDITION_NOT_EXISTS, - ); + $standard_type = $this->getHeraldFieldStandardType(); + switch ($standard_type) { case self::STANDARD_BOOL: return array( HeraldAdapter::CONDITION_IS_TRUE, @@ -44,6 +41,14 @@ abstract class HeraldField extends Phobject { HeraldAdapter::CONDITION_IS_ANY, HeraldAdapter::CONDITION_IS_NOT_ANY, ); + case self::STANDARD_PHID_LIST: + return array( + HeraldAdapter::CONDITION_INCLUDE_ALL, + HeraldAdapter::CONDITION_INCLUDE_ANY, + HeraldAdapter::CONDITION_INCLUDE_NONE, + HeraldAdapter::CONDITION_EXISTS, + HeraldAdapter::CONDITION_NOT_EXISTS, + ); case self::STANDARD_PHID_BOOL: return array( HeraldAdapter::CONDITION_EXISTS, @@ -69,14 +74,31 @@ abstract class HeraldField extends Phobject { ); } - throw new Exception(pht('Unknown standard condition set.')); + throw new Exception( + pht( + 'Herald field "%s" has unknown standard type "%s".', + get_class($this), + $standard_type)); } - protected function getHeraldFieldStandardConditions() { - throw new PhutilMethodNotImplementedException(); - } + public function getHeraldFieldValueType($condition) { + $standard_type = $this->getHeraldFieldStandardType(); + switch ($standard_type) { + case self::STANDARD_BOOL: + case self::STANDARD_PHID_BOOL: + return HeraldAdapter::VALUE_NONE; + case self::STANDARD_TEXT: + case self::STANDARD_TEXT_LIST: + case self::STANDARD_TEXT_MAP: + return HeraldAdapter::VALUE_TEXT; + } - abstract public function getHeraldFieldValueType($condition); + throw new Exception( + pht( + 'Herald field "%s" has unknown standard type "%s".', + get_class($this), + $standard_type)); + } abstract public function supportsObject($object); diff --git a/src/applications/herald/field/HeraldNewObjectField.php b/src/applications/herald/field/HeraldNewObjectField.php index 8c682cdaa2..48cc3cc465 100644 --- a/src/applications/herald/field/HeraldNewObjectField.php +++ b/src/applications/herald/field/HeraldNewObjectField.php @@ -16,12 +16,8 @@ final class HeraldNewObjectField extends HeraldField { return $this->getAdapter()->getIsNewObject(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php index fe519a571b..f42feda951 100644 --- a/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php @@ -13,7 +13,7 @@ final class ManiphestTaskAssigneeHeraldField return $object->getOwnerPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } diff --git a/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php index 641b247bfb..e44aba8e4d 100644 --- a/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php @@ -13,7 +13,7 @@ final class ManiphestTaskAuthorHeraldField return $object->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php index c1fdc0c2d1..5502bb0bf6 100644 --- a/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php @@ -13,12 +13,8 @@ final class ManiphestTaskDescriptionHeraldField return $object->getDescription(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php index 3e0cc8932f..22c9a53a62 100644 --- a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php @@ -13,7 +13,7 @@ final class ManiphestTaskPriorityHeraldField return $object->getPriority(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php index 063d1308df..49f6b210af 100644 --- a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php @@ -13,7 +13,7 @@ final class ManiphestTaskStatusHeraldField return $object->getStatus(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php index 33845d8b1e..efc628126f 100644 --- a/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php @@ -13,12 +13,8 @@ final class ManiphestTaskTitleHeraldField return $object->getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php index 89ca253fef..9133442f54 100644 --- a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php +++ b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php @@ -24,8 +24,8 @@ final class PhabricatorMetaMTAApplicationEmailHeraldField return $phids; } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/pholio/herald/PholioMockAuthorHeraldField.php b/src/applications/pholio/herald/PholioMockAuthorHeraldField.php index 46c5e8bf2b..a7bf6fabf5 100644 --- a/src/applications/pholio/herald/PholioMockAuthorHeraldField.php +++ b/src/applications/pholio/herald/PholioMockAuthorHeraldField.php @@ -13,7 +13,7 @@ final class PholioMockAuthorHeraldField return $object->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php b/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php index c201a8412c..e727307577 100644 --- a/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php +++ b/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php @@ -13,12 +13,8 @@ final class PholioMockDescriptionHeraldField return $object->getDescription(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/pholio/herald/PholioMockNameHeraldField.php b/src/applications/pholio/herald/PholioMockNameHeraldField.php index a39ac98527..206f09a720 100644 --- a/src/applications/pholio/herald/PholioMockNameHeraldField.php +++ b/src/applications/pholio/herald/PholioMockNameHeraldField.php @@ -13,12 +13,8 @@ final class PholioMockNameHeraldField return $object->getName(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php index 584c0f67cd..dd3aedb475 100644 --- a/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php @@ -13,7 +13,7 @@ final class PhrictionDocumentAuthorHeraldField return $object->getContent()->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php index ff0cda4d94..c933447cb3 100644 --- a/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php @@ -13,12 +13,8 @@ final class PhrictionDocumentContentHeraldField return $object->getContent()->getContent(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php index bcd7208d54..a7168907d7 100644 --- a/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php @@ -13,12 +13,8 @@ final class PhrictionDocumentPathHeraldField return $object->getcontent()->getSlug(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php index 79f6ec6498..99a5c6706c 100644 --- a/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php @@ -13,12 +13,8 @@ final class PhrictionDocumentTitleHeraldField return $object->getContent()->getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/project/herald/HeraldProjectsField.php b/src/applications/project/herald/HeraldProjectsField.php index c73ca50919..d7e77f3476 100644 --- a/src/applications/project/herald/HeraldProjectsField.php +++ b/src/applications/project/herald/HeraldProjectsField.php @@ -18,8 +18,8 @@ final class HeraldProjectsField extends HeraldField { PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { diff --git a/src/applications/spaces/herald/HeraldSpaceField.php b/src/applications/spaces/herald/HeraldSpaceField.php index a9afc016d5..75314c15c0 100644 --- a/src/applications/spaces/herald/HeraldSpaceField.php +++ b/src/applications/spaces/herald/HeraldSpaceField.php @@ -16,7 +16,7 @@ final class HeraldSpaceField extends HeraldField { return PhabricatorSpacesNamespaceQuery::getObjectSpacePHID($object); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } diff --git a/src/applications/subscriptions/herald/HeraldSubscribersField.php b/src/applications/subscriptions/herald/HeraldSubscribersField.php index 57de6acf8c..4d653bfd52 100644 --- a/src/applications/subscriptions/herald/HeraldSubscribersField.php +++ b/src/applications/subscriptions/herald/HeraldSubscribersField.php @@ -17,8 +17,8 @@ final class HeraldSubscribersField extends HeraldField { return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) {