mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Fix some Arcanist lint warnings
Summary: Lint. See https://github.com/facebook/phabricator/pull/332 Test Plan: Lint. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6126
This commit is contained in:
parent
ae66d4caa9
commit
e93726cb3b
4 changed files with 21 additions and 12 deletions
|
@ -363,6 +363,7 @@ class ArcanistSpellingDefaultData {
|
|||
"ploting" => "plotting",
|
||||
"posible" => "possible",
|
||||
"powerfull" => "powerful",
|
||||
"preceed" => "precede",
|
||||
"preceeded" => "preceded",
|
||||
"preceeding" => "preceding",
|
||||
"precendence" => "precedence",
|
||||
|
@ -463,7 +464,10 @@ class ArcanistSpellingDefaultData {
|
|||
"suppoted" => "supported",
|
||||
"suppported" => "supported",
|
||||
"suppport" => "support",
|
||||
"supress" => "suppress",
|
||||
"surpress" => "suppress",
|
||||
"surpresses" => "suppresses",
|
||||
"surpesses" => "suppresses",
|
||||
"suspicously" => "suspiciously",
|
||||
"synax" => "syntax",
|
||||
"synchonized" => "synchronized",
|
||||
|
|
|
@ -149,7 +149,7 @@ EOTEXT
|
|||
$files,
|
||||
$tmp_file);
|
||||
|
||||
// make sure to specify LANG on non-windows systems to surpress any fancy
|
||||
// make sure to specify LANG on non-windows systems to suppress any fancy
|
||||
// warnings; see @{method:getSVNLangEnvVar}.
|
||||
if (!phutil_is_windows()) {
|
||||
$command = csprintf('LANG=%C %C', $this->getSVNLangEnvVar(), $command);
|
||||
|
|
|
@ -181,7 +181,7 @@ EOTEXT
|
|||
$futures[$branch['name']] = $repository_api->execFutureLocal(
|
||||
"log -l 1 --template '%C' -r %s",
|
||||
"{node}\1{date|hgdate}\1{p1node}\1{desc|firstline}\1{desc}",
|
||||
hgsprintf($branch['name']));
|
||||
hgsprintf('%s', $branch['name']));
|
||||
|
||||
} else {
|
||||
// NOTE: "-s" is an option deep in git's diff argument parser that
|
||||
|
|
|
@ -53,7 +53,7 @@ EOTEXT
|
|||
"Only show tasks assigned to the given username, ".
|
||||
"also accepts @all to show all, default is you.",
|
||||
'conflict' => array(
|
||||
"unassigned" => "--owner supresses unassigned",
|
||||
"unassigned" => "--owner suppresses unassigned",
|
||||
),
|
||||
),
|
||||
'order' => array(
|
||||
|
@ -83,16 +83,16 @@ EOTEXT
|
|||
$unassigned = $this->getArgument('unassigned');
|
||||
|
||||
if ($owner) {
|
||||
$ownerPHID = $this->findOwnerPhid($owner);
|
||||
$owner_phid = $this->findOwnerPhid($owner);
|
||||
} elseif ($unassigned) {
|
||||
$ownerPHID = null;
|
||||
$owner_phid = null;
|
||||
} else {
|
||||
$ownerPHID = $this->getUserPHID();
|
||||
$owner_phid = $this->getUserPHID();
|
||||
}
|
||||
|
||||
$this->tasks = $this->loadManiphestTasks(
|
||||
($status == 'all' ? 'any' : $status),
|
||||
$ownerPHID,
|
||||
$owner_phid,
|
||||
$order,
|
||||
$limit);
|
||||
|
||||
|
@ -225,32 +225,37 @@ EOTEXT
|
|||
echo $table;
|
||||
}
|
||||
|
||||
private function findOwnerPhid($owner) {
|
||||
private function findOwnerPHID($owner) {
|
||||
$conduit = $this->getConduit();
|
||||
|
||||
$owner_phid = $conduit->callMethodSynchronous(
|
||||
'user.find',
|
||||
array(
|
||||
'aliases' => array($owner),
|
||||
));
|
||||
return (isset($owner_phid[$owner])?$owner_phid[$owner]:false);
|
||||
|
||||
return idx($owner_phid, $owner);
|
||||
}
|
||||
|
||||
private function loadManiphestTasks($status, $owner_phid, $order, $limit) {
|
||||
$conduit = $this->getConduit();
|
||||
|
||||
$find_params = array();
|
||||
if ($owner_phid !== false) {
|
||||
if ($owner_phid !== null) {
|
||||
$find_params['ownerPHIDs'] = array($owner_phid);
|
||||
}
|
||||
|
||||
if ($limit !== false) {
|
||||
$find_params['limit'] = $limit;
|
||||
}
|
||||
$find_params['order'] = ($order?"order-".$order:"order-priority");
|
||||
$find_params['status'] = ($status?"status-".$status:"status-open");
|
||||
|
||||
$find_params['order'] = ($order ? "order-".$order : "order-priority");
|
||||
$find_params['status'] = ($status ? "status-".$status : "status-open");
|
||||
|
||||
$tasks = $conduit->callMethodSynchronous(
|
||||
'maniphest.find',
|
||||
$find_params);
|
||||
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue