1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Rename classes for consistency

Summary: These classes are named differently from other `PhabricatorEdgeType` subclasses. Rename them for consistency.

Test Plan: I would expect the linter to complain if I missed anything.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11112
This commit is contained in:
Joshua Spence 2015-01-01 15:40:26 +11:00
parent 7e54ab23b3
commit 1ff6972f7e
5 changed files with 17 additions and 15 deletions

View file

@ -1989,8 +1989,8 @@ phutil_register_library_map(array(
'PhabricatorObjectListQueryTestCase' => 'applications/phid/query/__tests__/PhabricatorObjectListQueryTestCase.php',
'PhabricatorObjectMailReceiver' => 'applications/metamta/receiver/PhabricatorObjectMailReceiver.php',
'PhabricatorObjectMailReceiverTestCase' => 'applications/metamta/receiver/__tests__/PhabricatorObjectMailReceiverTestCase.php',
'PhabricatorObjectMentionedByObject' => 'applications/transactions/edges/PhabricatorObjectMentionedByObject.php',
'PhabricatorObjectMentionsObject' => 'applications/transactions/edges/PhabricatorObjectMentionsObject.php',
'PhabricatorObjectMentionedByObjectEdgeType' => 'applications/transactions/edges/PhabricatorObjectMentionedByObjectEdgeType.php',
'PhabricatorObjectMentionsObjectEdgeType' => 'applications/transactions/edges/PhabricatorObjectMentionsObjectEdgeType.php',
'PhabricatorObjectQuery' => 'applications/phid/query/PhabricatorObjectQuery.php',
'PhabricatorObjectRemarkupRule' => 'infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php',
'PhabricatorObjectSelectorDialog' => 'view/control/PhabricatorObjectSelectorDialog.php',
@ -5162,8 +5162,8 @@ phutil_register_library_map(array(
'PhabricatorObjectListQueryTestCase' => 'PhabricatorTestCase',
'PhabricatorObjectMailReceiver' => 'PhabricatorMailReceiver',
'PhabricatorObjectMailReceiverTestCase' => 'PhabricatorTestCase',
'PhabricatorObjectMentionedByObject' => 'PhabricatorEdgeType',
'PhabricatorObjectMentionsObject' => 'PhabricatorEdgeType',
'PhabricatorObjectMentionedByObjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorObjectMentionsObjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorObjectQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorObjectRemarkupRule' => 'PhutilRemarkupRule',
'PhabricatorOffsetPagedQuery' => 'PhabricatorQuery',

View file

@ -1,11 +1,12 @@
<?php
final class PhabricatorObjectMentionedByObject extends PhabricatorEdgeType {
final class PhabricatorObjectMentionedByObjectEdgeType
extends PhabricatorEdgeType {
const EDGECONST = 51;
public function getInverseEdgeConstant() {
return PhabricatorObjectMentionsObject::EDGECONST;
return PhabricatorObjectMentionsObjectEdgeType::EDGECONST;
}
public function shouldWriteInverseTransactions() {

View file

@ -1,11 +1,12 @@
<?php
final class PhabricatorObjectMentionsObject extends PhabricatorEdgeType {
final class PhabricatorObjectMentionsObjectEdgeType
extends PhabricatorEdgeType {
const EDGECONST = 52;
public function getInverseEdgeConstant() {
return PhabricatorObjectMentionedByObject::EDGECONST;
return PhabricatorObjectMentionedByObjectEdgeType::EDGECONST;
}
public function shouldWriteInverseTransactions() {

View file

@ -1249,7 +1249,7 @@ abstract class PhabricatorApplicationTransactionEditor
}
}
if ($mentionable_phids) {
$edge_type = PhabricatorObjectMentionsObject::EDGECONST;
$edge_type = PhabricatorObjectMentionsObjectEdgeType::EDGECONST;
$block_xactions[] = newv(get_class(head($xactions)), array())
->setIgnoreOnNoEffect(true)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)

View file

@ -452,10 +452,10 @@ abstract class PhabricatorApplicationTransaction
case PhabricatorTransactions::TYPE_EDGE:
$edge_type = $this->getMetadataValue('edge:type');
switch ($edge_type) {
case PhabricatorObjectMentionsObject::EDGECONST:
case PhabricatorObjectMentionsObjectEdgeType::EDGECONST:
return true;
break;
case PhabricatorObjectMentionedByObject::EDGECONST:
case PhabricatorObjectMentionedByObjectEdgeType::EDGECONST:
$new = ipull($this->getNewValue(), 'dst');
$old = ipull($this->getOldValue(), 'dst');
$add = array_diff($new, $old);
@ -491,8 +491,8 @@ abstract class PhabricatorApplicationTransaction
case PhabricatorTransactions::TYPE_EDGE:
$edge_type = $this->getMetadataValue('edge:type');
switch ($edge_type) {
case PhabricatorObjectMentionsObject::EDGECONST:
case PhabricatorObjectMentionedByObject::EDGECONST:
case PhabricatorObjectMentionsObjectEdgeType::EDGECONST:
case PhabricatorObjectMentionedByObjectEdgeType::EDGECONST:
return true;
break;
default:
@ -521,8 +521,8 @@ abstract class PhabricatorApplicationTransaction
case PhabricatorTransactions::TYPE_EDGE:
$edge_type = $this->getMetadataValue('edge:type');
switch ($edge_type) {
case PhabricatorObjectMentionsObject::EDGECONST:
case PhabricatorObjectMentionedByObject::EDGECONST:
case PhabricatorObjectMentionsObjectEdgeType::EDGECONST:
case PhabricatorObjectMentionedByObjectEdgeType::EDGECONST:
return true;
break;
default: