Differential D18339 Diff 44158 src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | foreach ($objects as $key => $object) { | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| } | } | ||||
| private function filterShouldLand(array $phids) { | private function filterShouldLand(array $phids) { | ||||
| $status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; | |||||
| $objects = $this->getRevisionsAuthored($this->objects, $phids); | $objects = $this->getRevisionsAuthored($this->objects, $phids); | ||||
| $results = array(); | $results = array(); | ||||
| foreach ($objects as $key => $object) { | foreach ($objects as $key => $object) { | ||||
| if ($object->getStatus() != $status_accepted) { | if (!$object->isAccepted()) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| Show All 18 Lines | foreach ($objects as $key => $object) { | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| } | } | ||||
| private function filterWaitingForReview(array $phids) { | private function filterWaitingForReview(array $phids) { | ||||
| $status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; | |||||
| $objects = $this->getRevisionsAuthored($this->objects, $phids); | $objects = $this->getRevisionsAuthored($this->objects, $phids); | ||||
| $results = array(); | $results = array(); | ||||
| foreach ($objects as $key => $object) { | foreach ($objects as $key => $object) { | ||||
| if ($object->getStatus() != $status_review) { | if (!$object->isNeedsReview()) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| Show All 19 Lines | foreach ($objects as $key => $object) { | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| } | } | ||||
| private function filterWaitingOnOtherReviewers(array $phids) { | private function filterWaitingOnOtherReviewers(array $phids) { | ||||
| $statuses = array( | |||||
| ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, | |||||
| ); | |||||
| $statuses = array_fuse($statuses); | |||||
| $objects = $this->getRevisionsNotAuthored($this->objects, $phids); | $objects = $this->getRevisionsNotAuthored($this->objects, $phids); | ||||
| $results = array(); | $results = array(); | ||||
| foreach ($objects as $key => $object) { | foreach ($objects as $key => $object) { | ||||
| if (!isset($statuses[$object->getStatus()])) { | if (!$object->isNeedsReview()) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $results[$key] = $object; | $results[$key] = $object; | ||||
| unset($this->objects[$key]); | unset($this->objects[$key]); | ||||
| } | } | ||||
| return $results; | return $results; | ||||
| Show All 24 Lines | |||||