Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / nuance / worker / NuanceWorker.php
blob5d09de9e693529b120f1d50bc891913775c113b3
1 <?php
3 abstract class NuanceWorker extends PhabricatorWorker {
5 protected function getViewer() {
6 return PhabricatorUser::getOmnipotentUser();
9 protected function loadItem($item_phid) {
10 $item = id(new NuanceItemQuery())
11 ->setViewer($this->getViewer())
12 ->withPHIDs(array($item_phid))
13 ->executeOne();
15 if (!$item) {
16 throw new PhabricatorWorkerPermanentFailureException(
17 pht(
18 'There is no Nuance item with PHID "%s".',
19 $item_phid));
22 return $item;