Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
| Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | private function getRelatedPHIDs($relation) { | ||||
| return ipull($this->getRawRelations($relation), 'objectPHID'); | return ipull($this->getRawRelations($relation), 'objectPHID'); | ||||
| } | } | ||||
| public function getRawRelations($relation) { | public function getRawRelations($relation) { | ||||
| return idx($this->relationships, $relation, array()); | return idx($this->relationships, $relation, array()); | ||||
| } | } | ||||
| public function getPrimaryReviewer() { | |||||
| $reviewers = $this->getReviewers(); | |||||
| $last = $this->lastReviewerPHID; | |||||
| if (!$last || !in_array($last, $reviewers)) { | |||||
| return head($this->getReviewers()); | |||||
| } | |||||
| return $last; | |||||
| } | |||||
| public function getHashes() { | public function getHashes() { | ||||
| return $this->assertAttached($this->hashes); | return $this->assertAttached($this->hashes); | ||||
| } | } | ||||
| public function attachHashes(array $hashes) { | public function attachHashes(array $hashes) { | ||||
| $this->hashes = $hashes; | $this->hashes = $hashes; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | public function getUsersToNotifyOfTokenGiven() { | ||||
| ); | ); | ||||
| } | } | ||||
| public function getReviewerStatus() { | public function getReviewerStatus() { | ||||
| return $this->assertAttached($this->reviewerStatus); | return $this->assertAttached($this->reviewerStatus); | ||||
| } | } | ||||
| public function attachReviewerStatus(array $reviewers) { | public function attachReviewerStatus(array $reviewers) { | ||||
| assert_instances_of($reviewers, 'DifferentialReviewerProxy'); | assert_instances_of($reviewers, 'DifferentialReviewer'); | ||||
| $this->reviewerStatus = $reviewers; | $this->reviewerStatus = $reviewers; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getReviewerPHIDsForEdit() { | public function getReviewerPHIDsForEdit() { | ||||
| $reviewers = $this->getReviewerStatus(); | $reviewers = $this->getReviewerStatus(); | ||||
| $status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING; | $status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING; | ||||
| ▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines | |||||