Differential D16360 Diff 39365 src/applications/differential/herald/HeraldDifferentialRevisionAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/herald/HeraldDifferentialRevisionAdapter.php
Show All 14 Lines | final class HeraldDifferentialRevisionAdapter | ||||
public function getAdapterApplicationClass() { | public function getAdapterApplicationClass() { | ||||
return 'PhabricatorDifferentialApplication'; | return 'PhabricatorDifferentialApplication'; | ||||
} | } | ||||
protected function newObject() { | protected function newObject() { | ||||
return new DifferentialRevision(); | return new DifferentialRevision(); | ||||
} | } | ||||
public function isTestAdapterForObject($object) { | |||||
return ($object instanceof DifferentialRevision); | |||||
} | |||||
public function getAdapterTestDescription() { | |||||
return pht( | |||||
'Test rules which run when a revision is created or updated.'); | |||||
} | |||||
public function newTestAdapter($object) { | |||||
return self::newLegacyAdapter( | |||||
$object, | |||||
$object->loadActiveDiff()); | |||||
} | |||||
protected function initializeNewAdapter() { | protected function initializeNewAdapter() { | ||||
$this->revision = $this->newObject(); | $this->revision = $this->newObject(); | ||||
} | } | ||||
public function getObject() { | public function getObject() { | ||||
return $this->revision; | return $this->revision; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |