mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Rename "DifferentialReviewer" to "DifferentialReviewerProxy"
Summary: Ref T10967. This makes room for a `DifferentialReviewer` object which can be a real storage table. Test Plan: Grepped for `DifferentialReviewer`, browsed Differential. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10967 Differential Revision: https://secure.phabricator.com/D17041
This commit is contained in:
parent
1e9a462baa
commit
77fa1ea738
8 changed files with 11 additions and 9 deletions
|
@ -495,9 +495,9 @@ phutil_register_library_map(array(
|
|||
'DifferentialResponsibleViewerFunctionDatasource' => 'applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php',
|
||||
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
|
||||
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
|
||||
'DifferentialReviewer' => 'applications/differential/storage/DifferentialReviewer.php',
|
||||
'DifferentialReviewerDatasource' => 'applications/differential/typeahead/DifferentialReviewerDatasource.php',
|
||||
'DifferentialReviewerForRevisionEdgeType' => 'applications/differential/edge/DifferentialReviewerForRevisionEdgeType.php',
|
||||
'DifferentialReviewerProxy' => 'applications/differential/storage/DifferentialReviewerProxy.php',
|
||||
'DifferentialReviewerStatus' => 'applications/differential/constants/DifferentialReviewerStatus.php',
|
||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingReviewersHeraldAction.php',
|
||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingSelfHeraldAction.php',
|
||||
|
@ -5125,9 +5125,9 @@ phutil_register_library_map(array(
|
|||
'DifferentialResponsibleViewerFunctionDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
|
||||
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialReviewer' => 'Phobject',
|
||||
'DifferentialReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DifferentialReviewerForRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||
'DifferentialReviewerProxy' => 'Phobject',
|
||||
'DifferentialReviewerStatus' => 'Phobject',
|
||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
|
|
|
@ -64,7 +64,7 @@ final class DifferentialCommentSaveController
|
|||
if (isset($current_reviewers[$reviewer_phid])) {
|
||||
continue;
|
||||
}
|
||||
$reviewer = new DifferentialReviewer(
|
||||
$reviewer = new DifferentialReviewerProxy(
|
||||
$reviewer_phid,
|
||||
array(
|
||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||
|
|
|
@ -84,7 +84,7 @@ final class DifferentialReviewersField
|
|||
}
|
||||
|
||||
foreach ($new_reviewers as $phid => $status) {
|
||||
$new_reviewers[$phid] = new DifferentialReviewer(
|
||||
$new_reviewers[$phid] = new DifferentialReviewerProxy(
|
||||
$phid,
|
||||
array(
|
||||
'status' => $status,
|
||||
|
|
|
@ -474,7 +474,7 @@ final class DifferentialTransactionEditor
|
|||
|
||||
$owner_phid = $object->getAuthorPHID();
|
||||
if ($owner_phid) {
|
||||
$reviewer = new DifferentialReviewer(
|
||||
$reviewer = new DifferentialReviewerProxy(
|
||||
$owner_phid,
|
||||
array(
|
||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||
|
|
|
@ -1008,7 +1008,9 @@ final class DifferentialRevisionQuery
|
|||
$revision_edges = $edges[$revision->getPHID()][$edge_type];
|
||||
$reviewers = array();
|
||||
foreach ($revision_edges as $reviewer_phid => $edge) {
|
||||
$reviewer = new DifferentialReviewer($reviewer_phid, $edge['data']);
|
||||
$reviewer = new DifferentialReviewerProxy(
|
||||
$reviewer_phid,
|
||||
$edge['data']);
|
||||
|
||||
if ($this->needReviewerAuthority) {
|
||||
if (!$viewer_phid) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialReviewer extends Phobject {
|
||||
final class DifferentialReviewerProxy extends Phobject {
|
||||
|
||||
private $reviewerPHID;
|
||||
private $status;
|
|
@ -403,7 +403,7 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
}
|
||||
|
||||
public function attachReviewerStatus(array $reviewers) {
|
||||
assert_instances_of($reviewers, 'DifferentialReviewer');
|
||||
assert_instances_of($reviewers, 'DifferentialReviewerProxy');
|
||||
|
||||
$this->reviewerStatus = $reviewers;
|
||||
return $this;
|
||||
|
|
|
@ -7,7 +7,7 @@ final class DifferentialReviewersView extends AphrontView {
|
|||
private $diff;
|
||||
|
||||
public function setReviewers(array $reviewers) {
|
||||
assert_instances_of($reviewers, 'DifferentialReviewer');
|
||||
assert_instances_of($reviewers, 'DifferentialReviewerProxy');
|
||||
$this->reviewers = $reviewers;
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue