mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
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
This commit is contained in:
parent
b1c4a258c9
commit
307a41e895
6 changed files with 15 additions and 15 deletions
|
@ -596,6 +596,7 @@ phutil_register_library_map(array(
|
|||
'HarbormasterScratchTable' => 'applications/harbormaster/storage/HarbormasterScratchTable.php',
|
||||
'HeraldAction' => 'applications/herald/storage/HeraldAction.php',
|
||||
'HeraldActionConfig' => 'applications/herald/config/HeraldActionConfig.php',
|
||||
'HeraldAdapter' => 'applications/herald/adapter/HeraldObjectAdapter.php',
|
||||
'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php',
|
||||
'HeraldCommitAdapter' => 'applications/herald/adapter/HeraldCommitAdapter.php',
|
||||
'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php',
|
||||
|
@ -614,7 +615,6 @@ phutil_register_library_map(array(
|
|||
'HeraldInvalidConditionException' => 'applications/herald/engine/engine/HeraldInvalidConditionException.php',
|
||||
'HeraldInvalidFieldException' => 'applications/herald/engine/engine/HeraldInvalidFieldException.php',
|
||||
'HeraldNewController' => 'applications/herald/controller/HeraldNewController.php',
|
||||
'HeraldObjectAdapter' => 'applications/herald/adapter/HeraldObjectAdapter.php',
|
||||
'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php',
|
||||
'HeraldPHIDTypeRule' => 'applications/herald/phid/HeraldPHIDTypeRule.php',
|
||||
'HeraldRecursiveConditionsException' => 'applications/herald/engine/engine/HeraldRecursiveConditionsException.php',
|
||||
|
@ -2612,13 +2612,13 @@ phutil_register_library_map(array(
|
|||
'HarbormasterScratchTable' => 'HarbormasterDAO',
|
||||
'HeraldAction' => 'HeraldDAO',
|
||||
'HeraldApplyTranscript' => 'HeraldDAO',
|
||||
'HeraldCommitAdapter' => 'HeraldObjectAdapter',
|
||||
'HeraldCommitAdapter' => 'HeraldAdapter',
|
||||
'HeraldCondition' => 'HeraldDAO',
|
||||
'HeraldController' => 'PhabricatorController',
|
||||
'HeraldDAO' => 'PhabricatorLiskDAO',
|
||||
'HeraldDeleteController' => 'HeraldController',
|
||||
'HeraldDifferentialRevisionAdapter' => 'HeraldObjectAdapter',
|
||||
'HeraldDryRunAdapter' => 'HeraldObjectAdapter',
|
||||
'HeraldDifferentialRevisionAdapter' => 'HeraldAdapter',
|
||||
'HeraldDryRunAdapter' => 'HeraldAdapter',
|
||||
'HeraldEditLogQuery' => 'PhabricatorOffsetPagedQuery',
|
||||
'HeraldInvalidConditionException' => 'Exception',
|
||||
'HeraldInvalidFieldException' => 'Exception',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
abstract class HeraldObjectAdapter {
|
||||
abstract class HeraldAdapter {
|
||||
|
||||
abstract public function getPHID();
|
||||
abstract public function getHeraldName();
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class HeraldCommitAdapter extends HeraldObjectAdapter {
|
||||
final class HeraldCommitAdapter extends HeraldAdapter {
|
||||
|
||||
protected $diff;
|
||||
protected $revision;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class HeraldDifferentialRevisionAdapter extends HeraldObjectAdapter {
|
||||
final class HeraldDifferentialRevisionAdapter extends HeraldAdapter {
|
||||
|
||||
protected $revision;
|
||||
protected $diff;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class HeraldDryRunAdapter extends HeraldObjectAdapter {
|
||||
final class HeraldDryRunAdapter extends HeraldAdapter {
|
||||
|
||||
public function getPHID() {
|
||||
return 0;
|
||||
|
|
|
@ -10,7 +10,7 @@ final class HeraldEngine {
|
|||
protected $fieldCache = array();
|
||||
protected $object = null;
|
||||
|
||||
public static function loadAndApplyRules(HeraldObjectAdapter $object) {
|
||||
public static function loadAndApplyRules(HeraldAdapter $object) {
|
||||
$content_type = $object->getHeraldTypeName();
|
||||
$rules = HeraldRule::loadAllByContentTypeWithFullData(
|
||||
$content_type,
|
||||
|
@ -23,7 +23,7 @@ final class HeraldEngine {
|
|||
return $engine->getTranscript();
|
||||
}
|
||||
|
||||
public function applyRules(array $rules, HeraldObjectAdapter $object) {
|
||||
public function applyRules(array $rules, HeraldAdapter $object) {
|
||||
assert_instances_of($rules, 'HeraldRule');
|
||||
$t_start = microtime(true);
|
||||
|
||||
|
@ -104,7 +104,7 @@ final class HeraldEngine {
|
|||
|
||||
public function applyEffects(
|
||||
array $effects,
|
||||
HeraldObjectAdapter $object,
|
||||
HeraldAdapter $object,
|
||||
array $rules) {
|
||||
assert_instances_of($effects, 'HeraldEffect');
|
||||
assert_instances_of($rules, 'HeraldRule');
|
||||
|
@ -175,7 +175,7 @@ final class HeraldEngine {
|
|||
|
||||
protected function doesRuleMatch(
|
||||
HeraldRule $rule,
|
||||
HeraldObjectAdapter $object) {
|
||||
HeraldAdapter $object) {
|
||||
|
||||
$id = $rule->getID();
|
||||
|
||||
|
@ -258,7 +258,7 @@ final class HeraldEngine {
|
|||
protected function doesConditionMatch(
|
||||
HeraldRule $rule,
|
||||
HeraldCondition $condition,
|
||||
HeraldObjectAdapter $object) {
|
||||
HeraldAdapter $object) {
|
||||
|
||||
$object_value = $this->getConditionObjectValue($condition, $object);
|
||||
$test_value = $condition->getValue();
|
||||
|
@ -420,7 +420,7 @@ final class HeraldEngine {
|
|||
|
||||
protected function getConditionObjectValue(
|
||||
HeraldCondition $condition,
|
||||
HeraldObjectAdapter $object) {
|
||||
HeraldAdapter $object) {
|
||||
|
||||
$field = $condition->getFieldName();
|
||||
|
||||
|
@ -483,7 +483,7 @@ final class HeraldEngine {
|
|||
|
||||
protected function getRuleEffects(
|
||||
HeraldRule $rule,
|
||||
HeraldObjectAdapter $object) {
|
||||
HeraldAdapter $object) {
|
||||
|
||||
$effects = array();
|
||||
foreach ($rule->getActions() as $action) {
|
||||
|
|
Loading…
Reference in a new issue