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

Rename PHIDType classes

Summary: Ref T5655. Rename `PhabricatorPHIDType` subclasses for clarity (see discussion in D9839). I'm not too keen on some of the resulting class names, so feel free to suggest alternatives.

Test Plan: Ran unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin, hach-que

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D9986
This commit is contained in:
Joshua Spence 2014-07-24 08:05:46 +10:00
parent 9a892dd906
commit 97a8700e45
221 changed files with 418 additions and 425 deletions

View file

@ -27,12 +27,12 @@ foreach ($rows as $row) {
$dst_table = 'differential_inline_comment';
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
DifferentialPHIDTypeRevision::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST);
$comment_phid = PhabricatorPHID::generateNewPHID(
PhabricatorPHIDConstants::PHID_TYPE_XCMT,
DifferentialPHIDTypeRevision::TYPECONST);
DifferentialRevisionPHIDType::TYPECONST);
queryfx(
$conn_w,

View file

@ -171,8 +171,8 @@ foreach ($rows as $row) {
$xaction_phid = idx($xaction, 'phid');
if (!$xaction_phid) {
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
DifferentialPHIDTypeRevision::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST);
}
unset($xaction['phid']);

View file

@ -43,8 +43,8 @@ foreach ($comments as $comment) {
$comment_phid = PhabricatorPHID::generateNewPHID(
PhabricatorPHIDConstants::PHID_TYPE_XCMT);
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
PhabricatorSlowvotePHIDTypePoll::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
PhabricatorSlowvotePollPHIDType::TYPECONST);
$source = PhabricatorContentSource::newForSource(
PhabricatorContentSource::SOURCE_LEGACY,

View file

@ -16,22 +16,22 @@ foreach ($rows as $row) {
$type = phid_get_type($row['targetPHID']);
switch ($type) {
case PonderPHIDTypeQuestion::TYPECONST:
case PonderQuestionPHIDType::TYPECONST:
$table_obj = $qtable;
$comment_obj = new PonderQuestionTransactionComment();
break;
case PonderPHIDTypeAnswer::TYPECONST:
case PonderAnswerPHIDType::TYPECONST:
$table_obj = $atable;
$comment_obj = new PonderAnswerTransactionComment();
break;
}
$comment_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
$type);
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
$type);
queryfx(

View file

@ -15,7 +15,7 @@ foreach ($rows as $row) {
echo "Adding transactions for paste id {$id}...\n";
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST);
queryfx(
$conn_w,

View file

@ -17,7 +17,7 @@ foreach (new LiskMigrationIterator(new HeraldRule()) as $rule) {
$conn_w,
'UPDATE %T SET phid = %s WHERE id = %d',
$table->getTableName(),
PhabricatorPHID::generateNewPHID(HeraldPHIDTypeRule::TYPECONST),
PhabricatorPHID::generateNewPHID(HeraldRulePHIDType::TYPECONST),
$rule->getID());
}

View file

@ -62,8 +62,8 @@ foreach ($rows as $row) {
// a comment in addition to an action) we'll insert that below.
if ($row['transactionType'] != 'comment') {
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
ManiphestPHIDTypeTask::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
ManiphestTaskPHIDType::TYPECONST);
queryfx(
$conn_w,
@ -93,12 +93,12 @@ foreach ($rows as $row) {
if ($has_comment) {
$comment_phid = PhabricatorPHID::generateNewPHID(
PhabricatorPHIDConstants::PHID_TYPE_XCMT,
ManiphestPHIDTypeTask::TYPECONST);
ManiphestTaskPHIDType::TYPECONST);
$comment_version = 1;
$comment_xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
ManiphestPHIDTypeTask::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
ManiphestTaskPHIDType::TYPECONST);
// Insert the comment data.
queryfx(

View file

@ -34,15 +34,15 @@ foreach ($rows as $row) {
if ($row['commentID']) {
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
DifferentialPHIDTypeRevision::TYPECONST);
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST);
} else {
$xaction_phid = null;
}
$comment_phid = PhabricatorPHID::generateNewPHID(
PhabricatorPHIDConstants::PHID_TYPE_XCMT,
DifferentialPHIDTypeRevision::TYPECONST);
DifferentialRevisionPHIDType::TYPECONST);
queryfx(
$conn_w,

View file

@ -47,7 +47,7 @@ foreach ($rows as $row) {
}
$xaction_phid = PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
PhabricatorProjectPHIDTypeProject::TYPECONST);
queryfx(

View file

@ -20,7 +20,7 @@ foreach ($chunk_iter as $chunk) {
continue;
}
$type_diff = DifferentialPHIDTypeDiff::TYPECONST;
$type_diff = DifferentialDiffPHIDType::TYPECONST;
$new_phid = PhabricatorPHID::generateNewPHID($type_diff);
$sql[] = qsprintf(

View file

@ -8,7 +8,7 @@ foreach (new LiskMigrationIterator($table) as $rev) {
$id = $rev->getID();
echo "Revision {$id}: ";
$deps = $rev->getAttachedPHIDs(DifferentialPHIDTypeRevision::TYPECONST);
$deps = $rev->getAttachedPHIDs(DifferentialRevisionPHIDType::TYPECONST);
if (!$deps) {
echo "-\n";
continue;

View file

@ -8,7 +8,7 @@ foreach (new LiskMigrationIterator($table) as $task) {
$id = $task->getID();
echo "Task {$id}: ";
$deps = $task->getAttachedPHIDs(ManiphestPHIDTypeTask::TYPECONST);
$deps = $task->getAttachedPHIDs(ManiphestTaskPHIDType::TYPECONST);
if (!$deps) {
echo "-\n";
continue;

View file

@ -8,7 +8,7 @@ foreach (new LiskMigrationIterator($table) as $task) {
$id = $task->getID();
echo "Task {$id}: ";
$revs = $task->getAttachedPHIDs(DifferentialPHIDTypeRevision::TYPECONST);
$revs = $task->getAttachedPHIDs(DifferentialRevisionPHIDType::TYPECONST);
if (!$revs) {
echo "-\n";
continue;

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorAuthPHIDTypeAuthFactor extends PhabricatorPHIDType {
final class PhabricatorAuthAuthFactorPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'AFTR';

View file

@ -19,7 +19,7 @@ final class PhabricatorAuthFactorConfig extends PhabricatorAuthDAO {
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorAuthPHIDTypeAuthFactor::TYPECONST);
PhabricatorAuthAuthFactorPHIDType::TYPECONST);
}
public function getImplementation() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorCalendarPHIDTypeEvent extends PhabricatorPHIDType {
final class PhabricatorCalendarEventPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'CEVT';

View file

@ -42,7 +42,7 @@ final class PhabricatorCalendarEvent
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorCalendarPHIDTypeEvent::TYPECONST);
PhabricatorCalendarEventPHIDType::TYPECONST);
}
public function getTerseSummary(PhabricatorUser $viewer) {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorConfigPHIDTypeConfig extends PhabricatorPHIDType {
final class PhabricatorConfigConfigPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'CONF';

View file

@ -19,7 +19,7 @@ final class PhabricatorConfigEntry extends PhabricatorConfigEntryDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorConfigPHIDTypeConfig::TYPECONST);
PhabricatorConfigConfigPHIDType::TYPECONST);
}
public static function loadConfigEntry($key) {

View file

@ -10,7 +10,7 @@ final class PhabricatorConfigTransaction
}
public function getApplicationTransactionType() {
return PhabricatorConfigPHIDTypeConfig::TYPECONST;
return PhabricatorConfigConfigPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorConpherencePHIDTypeThread extends PhabricatorPHIDType {
final class PhabricatorConpherenceThreadPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'CONP';

View file

@ -32,7 +32,7 @@ final class ConpherenceThread extends ConpherenceDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorConpherencePHIDTypeThread::TYPECONST);
PhabricatorConpherenceThreadPHIDType::TYPECONST);
}
public function save() {

View file

@ -7,7 +7,7 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
}
public function getApplicationTransactionType() {
return PhabricatorConpherencePHIDTypeThread::TYPECONST;
return PhabricatorConpherenceThreadPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorCountdownPHIDTypeCountdown extends PhabricatorPHIDType {
final class PhabricatorCountdownCountdownPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'CDWN';

View file

@ -32,7 +32,7 @@ final class PhabricatorCountdown
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorCountdownPHIDTypeCountdown::TYPECONST);
PhabricatorCountdownCountdownPHIDType::TYPECONST);
}

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorDashboardPHIDTypeDashboard extends PhabricatorPHIDType {
final class PhabricatorDashboardDashboardPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DSHB';

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorDashboardPHIDTypePanel extends PhabricatorPHIDType {
final class PhabricatorDashboardPanelPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DSHP';

View file

@ -43,7 +43,7 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorDashboardPHIDTypeDashboard::TYPECONST);
PhabricatorDashboardDashboardPHIDType::TYPECONST);
}
public function getLayoutConfigObject() {

View file

@ -47,7 +47,7 @@ final class PhabricatorDashboardPanel
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorDashboardPHIDTypePanel::TYPECONST);
PhabricatorDashboardPanelPHIDType::TYPECONST);
}
public function getProperty($key, $default = null) {

View file

@ -11,7 +11,7 @@ final class PhabricatorDashboardPanelTransaction
}
public function getApplicationTransactionType() {
return PhabricatorDashboardPHIDTypePanel::TYPECONST;
return PhabricatorDashboardPanelPHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -11,7 +11,7 @@ final class PhabricatorDashboardTransaction
}
public function getApplicationTransactionType() {
return PhabricatorDashboardPHIDTypeDashboard::TYPECONST;
return PhabricatorDashboardDashboardPHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -48,8 +48,8 @@ final class DifferentialAuditorsField
return $this->parseObjectList(
$value,
array(
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
));
}
@ -57,5 +57,4 @@ final class DifferentialAuditorsField
return $this->renderObjectList($handles);
}
}

View file

@ -91,7 +91,7 @@ final class DifferentialManiphestTasksField
return $this->parseObjectList(
$value,
array(
ManiphestPHIDTypeTask::TYPECONST,
ManiphestTaskPHIDType::TYPECONST,
));
}

View file

@ -106,7 +106,7 @@ final class DifferentialProjectsField
return $this->parseObjectList(
$value,
array(
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
));
}

View file

@ -55,8 +55,8 @@ final class DifferentialReviewedByField
return $this->parseObjectList(
$value,
array(
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
),
$allow_partial = true);
}

View file

@ -142,8 +142,8 @@ final class DifferentialReviewersField
return $this->parseObjectList(
$value,
array(
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
));
}

View file

@ -79,9 +79,9 @@ final class DifferentialSubscribersField
return $this->parseObjectList(
$value,
array(
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorMailingListPHIDTypeList::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
PhabricatorMailingListListPHIDType::TYPECONST,
));
}

View file

@ -1,6 +1,6 @@
<?php
final class DifferentialPHIDTypeDiff extends PhabricatorPHIDType {
final class DifferentialDiffPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DIFF';

View file

@ -1,6 +1,6 @@
<?php
final class DifferentialPHIDTypeRevision extends PhabricatorPHIDType {
final class DifferentialRevisionPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DREV';

View file

@ -1124,7 +1124,7 @@ final class DifferentialRevisionQuery
// Find all the project reviewers which the user may have authority over.
$project_phids = array();
$project_type = PhabricatorProjectPHIDTypeProject::TYPECONST;
$project_type = PhabricatorProjectProjectPHIDType::TYPECONST;
$edge_type = PhabricatorEdgeConfig::TYPE_DREV_HAS_REVIEWER;
foreach ($edges as $src => $types) {
if (!$allow_self) {

View file

@ -35,7 +35,7 @@ final class DifferentialRevisionSearchEngine
$request,
'reviewers',
array(
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
)));
$saved->setParameter(

View file

@ -24,7 +24,7 @@ final class DifferentialSearchIndexer
$doc = new PhabricatorSearchAbstractDocument();
$doc->setPHID($rev->getPHID());
$doc->setDocumentType(DifferentialPHIDTypeRevision::TYPECONST);
$doc->setDocumentType(DifferentialRevisionPHIDType::TYPECONST);
$doc->setDocumentTitle($rev->getTitle());
$doc->setDocumentCreated($rev->getDateCreated());
$doc->setDocumentModified($rev->getDateModified());
@ -32,7 +32,7 @@ final class DifferentialSearchIndexer
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR,
$rev->getAuthorPHID(),
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
$rev->getDateCreated());
$doc->addRelationship(
@ -40,7 +40,7 @@ final class DifferentialSearchIndexer
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
$rev->getPHID(),
DifferentialPHIDTypeRevision::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST,
time());
$this->indexTransactions(
@ -58,14 +58,14 @@ final class DifferentialSearchIndexer
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_OWNER,
$phid,
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
$rev->getDateModified()); // Bogus timestamp.
}
} else {
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_UNOWNED,
$rev->getPHID(),
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
$rev->getDateModified()); // Bogus timestamp.
}
} else {

View file

@ -47,7 +47,7 @@ final class DifferentialDiff
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
DifferentialPHIDTypeDiff::TYPECONST);
DifferentialDiffPHIDType::TYPECONST);
}
public function addUnsavedChangeset(DifferentialChangeset $changeset) {

View file

@ -184,8 +184,8 @@ final class DifferentialInlineComment
public function setCommentID($id) {
$this->proxy->setTransactionPHID(
PhabricatorPHID::generateNewPHID(
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST,
DifferentialPHIDTypeRevision::TYPECONST));
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST));
return $this;
}

View file

@ -26,7 +26,7 @@ final class DifferentialReviewer {
}
public function isUser() {
$user_type = PhabricatorPeoplePHIDTypeUser::TYPECONST;
$user_type = PhabricatorPeopleUserPHIDType::TYPECONST;
return (phid_get_type($this->getReviewerPHID()) == $user_type);
}

View file

@ -160,7 +160,7 @@ final class DifferentialRevision extends DifferentialDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
DifferentialPHIDTypeRevision::TYPECONST);
DifferentialRevisionPHIDType::TYPECONST);
}
public function loadActiveDiff() {

View file

@ -24,7 +24,7 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
}
public function getApplicationTransactionType() {
return DifferentialPHIDTypeRevision::TYPECONST;
return DifferentialRevisionPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {
@ -42,7 +42,7 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
// the new value is a PHID, indicating that this is a newer style
// transaction.
if ($old === null) {
if (phid_get_type($new) == DifferentialPHIDTypeDiff::TYPECONST) {
if (phid_get_type($new) == DifferentialDiffPHIDType::TYPECONST) {
return true;
}
}
@ -218,7 +218,7 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
case self::TYPE_UPDATE:
if ($new) {
// TODO: Migrate to PHIDs and use handles here?
if (phid_get_type($new) == DifferentialPHIDTypeDiff::TYPECONST) {
if (phid_get_type($new) == DifferentialDiffPHIDType::TYPECONST) {
return pht(
'%s updated this revision to %s.',
$author_handle,

View file

@ -1,7 +1,6 @@
<?php
final class DiffusionCommitRemarkupRule
extends PhabricatorRemarkupRuleObject {
final class DiffusionCommitRemarkupRule extends PhabricatorRemarkupRuleObject {
protected function getObjectNamePrefix() {
return '';
@ -12,7 +11,7 @@ final class DiffusionCommitRemarkupRule
}
protected function getObjectIDPattern() {
return PhabricatorRepositoryPHIDTypeCommit::getCommitObjectNamePattern();
return PhabricatorRepositoryCommitPHIDType::getCommitObjectNamePattern();
}
protected function loadObjects(array $ids) {

View file

@ -1,6 +1,6 @@
<?php
final class DivinerPHIDTypeAtom extends PhabricatorPHIDType {
final class DivinerAtomPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'ATOM';

View file

@ -1,6 +1,6 @@
<?php
final class DivinerPHIDTypeBook extends PhabricatorPHIDType {
final class DivinerBookPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'BOOK';

View file

@ -27,7 +27,7 @@ final class DivinerLiveBook extends DivinerDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
DivinerPHIDTypeBook::TYPECONST);
DivinerBookPHIDType::TYPECONST);
}
public function getTitle() {

View file

@ -31,8 +31,7 @@ final class DivinerLiveSymbol extends DivinerDAO
}
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
DivinerPHIDTypeAtom::TYPECONST);
return PhabricatorPHID::generateNewPHID(DivinerAtomPHIDType::TYPECONST);
}
public function getBook() {

View file

@ -1,6 +1,6 @@
<?php
final class DrydockPHIDTypeBlueprint extends PhabricatorPHIDType {
final class DrydockBlueprintPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DRYB';

View file

@ -1,6 +1,6 @@
<?php
final class DrydockPHIDTypeLease extends PhabricatorPHIDType {
final class DrydockLeasePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DRYL';

View file

@ -1,6 +1,6 @@
<?php
final class DrydockPHIDTypeResource extends PhabricatorPHIDType {
final class DrydockResourcePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'DRYR';

View file

@ -39,7 +39,7 @@ final class DrydockBlueprint extends DrydockDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
DrydockPHIDTypeBlueprint::TYPECONST);
DrydockBlueprintPHIDType::TYPECONST);
}
public function getImplementation() {

View file

@ -10,7 +10,7 @@ final class DrydockBlueprintTransaction
}
public function getApplicationTransactionType() {
return DrydockPHIDTypeBlueprint::TYPECONST;
return DrydockBlueprintPHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -56,7 +56,7 @@ final class DrydockLease extends DrydockDAO
}
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(DrydockPHIDTypeLease::TYPECONST);
return PhabricatorPHID::generateNewPHID(DrydockLeasePHIDType::TYPECONST);
}
public function getInterface($type) {

View file

@ -27,7 +27,7 @@ final class DrydockResource extends DrydockDAO
}
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(DrydockPHIDTypeResource::TYPECONST);
return PhabricatorPHID::generateNewPHID(DrydockResourcePHIDType::TYPECONST);
}
public function getAttribute($key, $default = null) {

View file

@ -277,7 +277,7 @@ abstract class PhabricatorFeedStory implements PhabricatorPolicyInterface {
// the '_top' target for framed feeds.
$class = null;
if ($handle->getType() == PhabricatorPeoplePHIDTypeUser::TYPECONST) {
if ($handle->getType() == PhabricatorPeopleUserPHIDType::TYPECONST) {
$class = 'phui-link-person';
}

View file

@ -18,7 +18,7 @@ abstract class PhabricatorFilesManagementWorkflow
$query = id(new PhabricatorObjectQuery())
->setViewer($this->getViewer())
->withNames($names)
->withTypes(array(PhabricatorFilePHIDTypeFile::TYPECONST));
->withTypes(array(PhabricatorFileFilePHIDType::TYPECONST));
$query->execute();
$files = $query->getNamedResults();

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorFilePHIDTypeFile extends PhabricatorPHIDType {
final class PhabricatorFileFilePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'FILE';

View file

@ -43,7 +43,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorFilePHIDTypeFile::TYPECONST);
PhabricatorFileFilePHIDType::TYPECONST);
}
public function save() {

View file

@ -8,7 +8,7 @@ final class PhabricatorFileTransaction
}
public function getApplicationTransactionType() {
return PhabricatorFilePHIDTypeFile::TYPECONST;
return PhabricatorFileFilePHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildItem extends PhabricatorPHIDType {
final class HarbormasterBuildItemPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMBI';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildLog extends PhabricatorPHIDType {
final class HarbormasterBuildLogPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMCL';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuild extends PhabricatorPHIDType {
final class HarbormasterBuildPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMBD';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildPlan extends PhabricatorPHIDType {
final class HarbormasterBuildPlanPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMCP';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildStep extends PhabricatorPHIDType {
final class HarbormasterBuildStepPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMCS';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildTarget extends PhabricatorPHIDType {
final class HarbormasterBuildTargetPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMBT';

View file

@ -1,6 +1,6 @@
<?php
final class HarbormasterPHIDTypeBuildable extends PhabricatorPHIDType {
final class HarbormasterBuildablePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HMBB';

View file

@ -18,14 +18,14 @@ final class HarbormasterBuildableSearchEngine
$request,
'revisions',
array(
DifferentialPHIDTypeRevision::TYPECONST,
DifferentialRevisionPHIDType::TYPECONST,
));
$repositories = $this->readPHIDsFromRequest(
$request,
'repositories',
array(
PhabricatorRepositoryPHIDTypeRepository::TYPECONST,
PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
));
$container_phids = array_merge($revisions, $repositories);
@ -35,7 +35,7 @@ final class HarbormasterBuildableSearchEngine
$request,
'commits',
array(
PhabricatorRepositoryPHIDTypeCommit::TYPECONST,
PhabricatorRepositoryCommitPHIDType::TYPECONST,
));
$diffs = $this->readListFromRequest($request, 'diffs');

View file

@ -11,7 +11,7 @@ final class HarbormasterBuildTransaction
}
public function getApplicationTransactionType() {
return HarbormasterPHIDTypeBuild::TYPECONST;
return HarbormasterBuildPHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -160,7 +160,7 @@ final class HarbormasterBuildable extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildable::TYPECONST);
HarbormasterBuildablePHIDType::TYPECONST);
}
public function attachBuildableObject($buildable_object) {

View file

@ -11,7 +11,7 @@ final class HarbormasterBuildableTransaction
}
public function getApplicationTransactionType() {
return HarbormasterPHIDTypeBuildable::TYPECONST;
return HarbormasterBuildablePHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -136,7 +136,7 @@ final class HarbormasterBuild extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuild::TYPECONST);
HarbormasterBuildPHIDType::TYPECONST);
}
public function attachBuildable(HarbormasterBuildable $buildable) {

View file

@ -12,7 +12,7 @@ final class HarbormasterBuildItem extends HarbormasterDAO {
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildItem::TYPECONST);
HarbormasterBuildItemPHIDType::TYPECONST);
}
}

View file

@ -35,7 +35,7 @@ final class HarbormasterBuildLog extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildLog::TYPECONST);
HarbormasterBuildLogPHIDType::TYPECONST);
}
public function attachBuildTarget(HarbormasterBuildTarget $build_target) {

View file

@ -47,7 +47,7 @@ final class HarbormasterBuildTarget extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildTarget::TYPECONST);
HarbormasterBuildTargetPHIDType::TYPECONST);
}
public function attachBuild(HarbormasterBuild $build) {

View file

@ -26,7 +26,7 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildPlan::TYPECONST);
HarbormasterBuildPlanPHIDType::TYPECONST);
}
public function attachBuildSteps(array $steps) {

View file

@ -11,7 +11,7 @@ final class HarbormasterBuildPlanTransaction
}
public function getApplicationTransactionType() {
return HarbormasterPHIDTypeBuildPlan::TYPECONST;
return HarbormasterBuildPlanPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -30,7 +30,7 @@ final class HarbormasterBuildStep extends HarbormasterDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
HarbormasterPHIDTypeBuildStep::TYPECONST);
HarbormasterBuildStepPHIDType::TYPECONST);
}
public function attachBuildPlan(HarbormasterBuildPlan $plan) {

View file

@ -11,7 +11,7 @@ final class HarbormasterBuildStepTransaction
}
public function getApplicationTransactionType() {
return HarbormasterPHIDTypeBuildStep::TYPECONST;
return HarbormasterBuildStepPHIDType::TYPECONST;
}
public function getTitle() {

View file

@ -297,7 +297,7 @@ final class HeraldTranscriptController extends HeraldController {
$object_xscript = $xscript->getObjectTranscript();
$handle = $handles[$object_xscript->getPHID()];
if ($handle->getType() ==
PhabricatorRepositoryPHIDTypeCommit::TYPECONST) {
PhabricatorRepositoryCommitPHIDType::TYPECONST) {
$commit = id(new DiffusionCommitQuery())
->setViewer($request->getUser())
->withPHIDs(array($handle->getPHID()))

View file

@ -1,6 +1,6 @@
<?php
final class HeraldPHIDTypeRule extends PhabricatorPHIDType {
final class HeraldRulePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HRUL';

View file

@ -35,7 +35,7 @@ final class HeraldRule extends HeraldDAO
}
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(HeraldPHIDTypeRule::TYPECONST);
return PhabricatorPHID::generateNewPHID(HeraldRulePHIDType::TYPECONST);
}
public function getRuleApplied($phid) {

View file

@ -11,7 +11,7 @@ final class HeraldRuleTransaction
}
public function getApplicationTransactionType() {
return HeraldPHIDTypeRule::TYPECONST;
return HeraldRulePHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorLegalpadPHIDTypeDocument extends PhabricatorPHIDType {
final class PhabricatorLegalpadDocumentPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'LEGD';

View file

@ -31,7 +31,7 @@ final class LegalpadDocumentSignatureSearchEngine
$request,
'documents',
array(
PhabricatorLegalpadPHIDTypeDocument::TYPECONST,
PhabricatorLegalpadDocumentPHIDType::TYPECONST,
)));
$saved->setParameter('nameContains', $request->getStr('nameContains'));

View file

@ -59,7 +59,7 @@ final class LegalpadDocument extends LegalpadDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorLegalpadPHIDTypeDocument::TYPECONST);
PhabricatorLegalpadDocumentPHIDType::TYPECONST);
}
public function getDocumentBody() {

View file

@ -7,7 +7,7 @@ final class LegalpadTransaction extends PhabricatorApplicationTransaction {
}
public function getApplicationTransactionType() {
return PhabricatorLegalpadPHIDTypeDocument::TYPECONST;
return PhabricatorLegalpadDocumentPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorMacroPHIDTypeMacro extends PhabricatorPHIDType {
final class PhabricatorMacroMacroPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'MCRO';

View file

@ -175,7 +175,7 @@ final class PhabricatorMacroQuery
}
$flags = id(new PhabricatorFlagQuery())
->withOwnerPHIDs(array($this->getViewer()->getPHID()))
->withTypes(array(PhabricatorMacroPHIDTypeMacro::TYPECONST))
->withTypes(array(PhabricatorMacroMacroPHIDType::TYPECONST))
->withColors($flag_colors)
->setViewer($this->getViewer())
->execute();

View file

@ -48,7 +48,7 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorMacroPHIDTypeMacro::TYPECONST);
PhabricatorMacroMacroPHIDType::TYPECONST);
}

View file

@ -12,7 +12,7 @@ final class PhabricatorMacroTransaction
}
public function getApplicationTransactionType() {
return PhabricatorMacroPHIDTypeMacro::TYPECONST;
return PhabricatorMacroMacroPHIDType::TYPECONST;
}
public function getApplicationTransactionCommentObject() {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorMailingListPHIDTypeList extends PhabricatorPHIDType {
final class PhabricatorMailingListListPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'MLST';

View file

@ -11,7 +11,7 @@ final class PhabricatorMetaMTAMailingList extends PhabricatorMetaMTADAO
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
PhabricatorMailingListPHIDTypeList::TYPECONST);
PhabricatorMailingListListPHIDType::TYPECONST);
}
public function getConfiguration() {

View file

@ -102,7 +102,7 @@ abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod {
if ($owner_phid !== null) {
$this->validatePHIDList(
array($owner_phid),
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
'ownerPHID');
$changes[ManiphestTransaction::TYPE_OWNER] = $owner_phid;
}
@ -111,7 +111,7 @@ abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod {
if ($ccs !== null) {
$this->validatePHIDList(
$ccs,
PhabricatorPeoplePHIDTypeUser::TYPECONST,
PhabricatorPeopleUserPHIDType::TYPECONST,
'ccPHIDS');
$changes[ManiphestTransaction::TYPE_CCS] = $ccs;
}
@ -122,7 +122,7 @@ abstract class ConduitAPI_maniphest_Method extends ConduitAPIMethod {
if ($project_phids !== null) {
$this->validatePHIDList(
$project_phids,
PhabricatorProjectPHIDTypeProject::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
'projectPHIDS');
$project_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;

View file

@ -647,7 +647,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$attached = array();
}
$file_infos = idx($attached, PhabricatorFilePHIDTypeFile::TYPECONST);
$file_infos = idx($attached, PhabricatorFileFilePHIDType::TYPECONST);
if ($file_infos) {
$file_phids = array_keys($file_infos);

Some files were not shown because too many files have changed in this diff Show more