Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/herald/HeraldCommitAdapter.php
Show All 21 Lines | final class HeraldCommitAdapter | ||||
public function getAdapterApplicationClass() { | public function getAdapterApplicationClass() { | ||||
return 'PhabricatorDiffusionApplication'; | return 'PhabricatorDiffusionApplication'; | ||||
} | } | ||||
protected function newObject() { | protected function newObject() { | ||||
return new PhabricatorRepositoryCommit(); | return new PhabricatorRepositoryCommit(); | ||||
} | } | ||||
public function isTestAdapterForObject($object) { | |||||
return ($object instanceof PhabricatorRepositoryCommit); | |||||
} | |||||
public function getAdapterTestDescription() { | |||||
return pht( | |||||
'Test rules which run after a commit is discovered and imported.'); | |||||
} | |||||
protected function initializeNewAdapter() { | protected function initializeNewAdapter() { | ||||
$this->commit = $this->newObject(); | $this->commit = $this->newObject(); | ||||
} | } | ||||
public function setObject($object) { | |||||
$this->commit = $object; | |||||
return $this; | |||||
} | |||||
public function getObject() { | public function getObject() { | ||||
return $this->commit; | return $this->commit; | ||||
} | } | ||||
public function getAdapterContentType() { | public function getAdapterContentType() { | ||||
return 'commit'; | return 'commit'; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |