Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
| Show First 20 Lines • Show All 606 Lines • ▼ Show 20 Lines | public function getRepository() { | ||||
| return $this->assertAttached($this->repository); | return $this->assertAttached($this->repository); | ||||
| } | } | ||||
| public function attachRepository(PhabricatorRepository $repository = null) { | public function attachRepository(PhabricatorRepository $repository = null) { | ||||
| $this->repository = $repository; | $this->repository = $repository; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setModernRevisionStatus($status) { | |||||
| $status_object = DifferentialRevisionStatus::newForStatus($status); | |||||
| if ($status_object->getKey() != $status) { | |||||
| throw new Exception( | |||||
| pht( | |||||
| 'Trying to set revision to invalid status "%s".', | |||||
| $status)); | |||||
| } | |||||
| $legacy_status = $status_object->getLegacyKey(); | |||||
| return $this->setStatus($legacy_status); | |||||
| } | |||||
| public function isClosed() { | public function isClosed() { | ||||
| return $this->getStatusObject()->isClosedStatus(); | return $this->getStatusObject()->isClosedStatus(); | ||||
| } | } | ||||
| public function isAbandoned() { | public function isAbandoned() { | ||||
| return $this->getStatusObject()->isAbandoned(); | return $this->getStatusObject()->isAbandoned(); | ||||
| } | } | ||||
| public function isAccepted() { | public function isAccepted() { | ||||
| return $this->getStatusObject()->isAccepted(); | return $this->getStatusObject()->isAccepted(); | ||||
| } | } | ||||
| public function isNeedsReview() { | public function isNeedsReview() { | ||||
| return $this->getStatusObject()->isNeedsReview(); | return $this->getStatusObject()->isNeedsReview(); | ||||
| } | } | ||||
| public function isNeedsRevision() { | |||||
| return $this->getStatusObject()->isNeedsRevision(); | |||||
| } | |||||
| public function isChangePlanned() { | public function isChangePlanned() { | ||||
| return $this->getStatusObject()->isChangePlanned(); | return $this->getStatusObject()->isChangePlanned(); | ||||
| } | } | ||||
| public function isPublished() { | public function isPublished() { | ||||
| return $this->getStatusObject()->isPublished(); | return $this->getStatusObject()->isPublished(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines | |||||