protected function getResult(ConduitAPIRequest $request) { try { $results = parent::getResult($request); } catch (CommandException $ex) { throw id(new ConduitException('ERR-GREP-COMMAND'))->setErrorDescription($ex->getStderr()); } $offset = $request->getValue('offset'); $results = array_slice($results, $offset); return $results; }
protected function getResult(ConduitAPIRequest $request) { try { $results = parent::getResult($request); } catch (CommandException $ex) { $err = $ex->getError(); if ($err === 1) { // `git grep` and `hg grep` exit with 1 if there are no matches; // assume we just didn't get any hits. return array(); } throw $ex; } $offset = $request->getValue('offset'); $results = array_slice($results, $offset); return $results; }
protected function getResult(ConduitAPIRequest $request) { $results = parent::getResult($request); $offset = $request->getValue('offset'); return array_slice($results, $offset); }
protected function getResult(ConduitAPIRequest $request) { $result = parent::getResult($request); return array('changes' => mpull($result, 'toDictionary'), 'effectiveCommit' => $this->getEffectiveCommit($request)); }
protected function getResult(ConduitAPIRequest $request) { $result = parent::getResult($request); return $result->toDictionary(); }
protected function getResult(ConduitAPIRequest $request) { $path_changes = parent::getResult($request); return array('pathChanges' => mpull($path_changes, 'toDictionary'), 'parents' => $this->parents); }