@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename "HeraldObjectAdapter" to "HeraldAdapter"

Summary: Ref T2769. The term "Object" is redundant.

Test Plan: grep

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2769

Differential Revision: https://secure.phabricator.com/D6655

+15 -15
+4 -4
src/__phutil_library_map__.php
··· 596 596 'HarbormasterScratchTable' => 'applications/harbormaster/storage/HarbormasterScratchTable.php', 597 597 'HeraldAction' => 'applications/herald/storage/HeraldAction.php', 598 598 'HeraldActionConfig' => 'applications/herald/config/HeraldActionConfig.php', 599 + 'HeraldAdapter' => 'applications/herald/adapter/HeraldObjectAdapter.php', 599 600 'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php', 600 601 'HeraldCommitAdapter' => 'applications/herald/adapter/HeraldCommitAdapter.php', 601 602 'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php', ··· 614 615 'HeraldInvalidConditionException' => 'applications/herald/engine/engine/HeraldInvalidConditionException.php', 615 616 'HeraldInvalidFieldException' => 'applications/herald/engine/engine/HeraldInvalidFieldException.php', 616 617 'HeraldNewController' => 'applications/herald/controller/HeraldNewController.php', 617 - 'HeraldObjectAdapter' => 'applications/herald/adapter/HeraldObjectAdapter.php', 618 618 'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php', 619 619 'HeraldPHIDTypeRule' => 'applications/herald/phid/HeraldPHIDTypeRule.php', 620 620 'HeraldRecursiveConditionsException' => 'applications/herald/engine/engine/HeraldRecursiveConditionsException.php', ··· 2612 2612 'HarbormasterScratchTable' => 'HarbormasterDAO', 2613 2613 'HeraldAction' => 'HeraldDAO', 2614 2614 'HeraldApplyTranscript' => 'HeraldDAO', 2615 - 'HeraldCommitAdapter' => 'HeraldObjectAdapter', 2615 + 'HeraldCommitAdapter' => 'HeraldAdapter', 2616 2616 'HeraldCondition' => 'HeraldDAO', 2617 2617 'HeraldController' => 'PhabricatorController', 2618 2618 'HeraldDAO' => 'PhabricatorLiskDAO', 2619 2619 'HeraldDeleteController' => 'HeraldController', 2620 - 'HeraldDifferentialRevisionAdapter' => 'HeraldObjectAdapter', 2621 - 'HeraldDryRunAdapter' => 'HeraldObjectAdapter', 2620 + 'HeraldDifferentialRevisionAdapter' => 'HeraldAdapter', 2621 + 'HeraldDryRunAdapter' => 'HeraldAdapter', 2622 2622 'HeraldEditLogQuery' => 'PhabricatorOffsetPagedQuery', 2623 2623 'HeraldInvalidConditionException' => 'Exception', 2624 2624 'HeraldInvalidFieldException' => 'Exception',
+1 -1
src/applications/herald/adapter/HeraldCommitAdapter.php
··· 1 1 <?php 2 2 3 - final class HeraldCommitAdapter extends HeraldObjectAdapter { 3 + final class HeraldCommitAdapter extends HeraldAdapter { 4 4 5 5 protected $diff; 6 6 protected $revision;
+1 -1
src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
··· 1 1 <?php 2 2 3 - final class HeraldDifferentialRevisionAdapter extends HeraldObjectAdapter { 3 + final class HeraldDifferentialRevisionAdapter extends HeraldAdapter { 4 4 5 5 protected $revision; 6 6 protected $diff;
+1 -1
src/applications/herald/adapter/HeraldDryRunAdapter.php
··· 1 1 <?php 2 2 3 - final class HeraldDryRunAdapter extends HeraldObjectAdapter { 3 + final class HeraldDryRunAdapter extends HeraldAdapter { 4 4 5 5 public function getPHID() { 6 6 return 0;
+1 -1
src/applications/herald/adapter/HeraldObjectAdapter.php src/applications/herald/adapter/HeraldAdapter.php
··· 1 1 <?php 2 2 3 - abstract class HeraldObjectAdapter { 3 + abstract class HeraldAdapter { 4 4 5 5 abstract public function getPHID(); 6 6 abstract public function getHeraldName();
+7 -7
src/applications/herald/engine/HeraldEngine.php
··· 10 10 protected $fieldCache = array(); 11 11 protected $object = null; 12 12 13 - public static function loadAndApplyRules(HeraldObjectAdapter $object) { 13 + public static function loadAndApplyRules(HeraldAdapter $object) { 14 14 $content_type = $object->getHeraldTypeName(); 15 15 $rules = HeraldRule::loadAllByContentTypeWithFullData( 16 16 $content_type, ··· 23 23 return $engine->getTranscript(); 24 24 } 25 25 26 - public function applyRules(array $rules, HeraldObjectAdapter $object) { 26 + public function applyRules(array $rules, HeraldAdapter $object) { 27 27 assert_instances_of($rules, 'HeraldRule'); 28 28 $t_start = microtime(true); 29 29 ··· 104 104 105 105 public function applyEffects( 106 106 array $effects, 107 - HeraldObjectAdapter $object, 107 + HeraldAdapter $object, 108 108 array $rules) { 109 109 assert_instances_of($effects, 'HeraldEffect'); 110 110 assert_instances_of($rules, 'HeraldRule'); ··· 175 175 176 176 protected function doesRuleMatch( 177 177 HeraldRule $rule, 178 - HeraldObjectAdapter $object) { 178 + HeraldAdapter $object) { 179 179 180 180 $id = $rule->getID(); 181 181 ··· 258 258 protected function doesConditionMatch( 259 259 HeraldRule $rule, 260 260 HeraldCondition $condition, 261 - HeraldObjectAdapter $object) { 261 + HeraldAdapter $object) { 262 262 263 263 $object_value = $this->getConditionObjectValue($condition, $object); 264 264 $test_value = $condition->getValue(); ··· 420 420 421 421 protected function getConditionObjectValue( 422 422 HeraldCondition $condition, 423 - HeraldObjectAdapter $object) { 423 + HeraldAdapter $object) { 424 424 425 425 $field = $condition->getFieldName(); 426 426 ··· 483 483 484 484 protected function getRuleEffects( 485 485 HeraldRule $rule, 486 - HeraldObjectAdapter $object) { 486 + HeraldAdapter $object) { 487 487 488 488 $effects = array(); 489 489 foreach ($rule->getActions() as $action) {