mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Fix lint errors found by Nemo
Summary: See also: - https://github.com/tpyo/amazon-s3-php-class/pull/33 - https://github.com/stripe/stripe-php/pull/13 Test Plan: Ran a script analyzing sources by HPHP. Reviewers: btrahan, jungejason, epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2713
This commit is contained in:
parent
2793828795
commit
2e484e257d
9 changed files with 20 additions and 17 deletions
|
@ -278,7 +278,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$changeset_view->setVsMap($vs_map);
|
$changeset_view->setVsMap($vs_map);
|
||||||
$changeset_view->setWhitespace($whitespace);
|
$changeset_view->setWhitespace($whitespace);
|
||||||
if ($repository) {
|
if ($repository) {
|
||||||
$changeset_view->setRepository($repository, $target);
|
$changeset_view->setRepository($repository);
|
||||||
}
|
}
|
||||||
$changeset_view->setSymbolIndexes($symbol_indexes);
|
$changeset_view->setSymbolIndexes($symbol_indexes);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ final class HeraldActionConfig {
|
||||||
self::ACTION_NOTHING,
|
self::ACTION_NOTHING,
|
||||||
));
|
));
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unknown content type '{$type}'.");
|
throw new Exception("Unknown content type '{$content_type}'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ final class ManiphestTaskEditController extends ManiphestController {
|
||||||
$phids = array_unique($phids);
|
$phids = array_unique($phids);
|
||||||
|
|
||||||
$handles = id(new PhabricatorObjectHandleData($phids))
|
$handles = id(new PhabricatorObjectHandleData($phids))
|
||||||
->loadHandles($phids);
|
->loadHandles();
|
||||||
|
|
||||||
$tvalues = mpull($handles, 'getFullName', 'getPHID');
|
$tvalues = mpull($handles, 'getFullName', 'getPHID');
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ extends PhabricatorOAuthServerController {
|
||||||
public function processRequest() {
|
public function processRequest() {
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$current_user = $request->getUser();
|
$current_user = $request->getUser();
|
||||||
$server = new PhabricatorOAuthServer($current_user);
|
$server = new PhabricatorOAuthServer();
|
||||||
$panels = array();
|
$panels = array();
|
||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,6 @@ extends PhameController {
|
||||||
} else if ($this->getBloggerName() && $this->getPhameTitle()) {
|
} else if ($this->getBloggerName() && $this->getPhameTitle()) {
|
||||||
$phame_title = $this->getPhameTitle();
|
$phame_title = $this->getPhameTitle();
|
||||||
$phame_title = PhabricatorSlug::normalize($phame_title);
|
$phame_title = PhabricatorSlug::normalize($phame_title);
|
||||||
if ($phame_title != $this->getPhameTitle()) {
|
|
||||||
$uri = $post->getViewURI($this->getBloggerName());
|
|
||||||
return id(new AphrontRedirectResponse())->setURI($uri);
|
|
||||||
}
|
|
||||||
$blogger = id(new PhabricatorUser())->loadOneWhere(
|
$blogger = id(new PhabricatorUser())->loadOneWhere(
|
||||||
'username = %s',
|
'username = %s',
|
||||||
$this->getBloggerName());
|
$this->getBloggerName());
|
||||||
|
@ -107,7 +103,11 @@ extends PhameController {
|
||||||
$post = id(new PhamePost())->loadOneWhere(
|
$post = id(new PhamePost())->loadOneWhere(
|
||||||
'bloggerPHID = %s AND phameTitle = %s',
|
'bloggerPHID = %s AND phameTitle = %s',
|
||||||
$blogger->getPHID(),
|
$blogger->getPHID(),
|
||||||
$this->getPhameTitle());
|
$phame_title);
|
||||||
|
if ($post && $phame_title != $this->getPhameTitle()) {
|
||||||
|
$uri = $post->getViewURI($this->getBloggerName());
|
||||||
|
return id(new AphrontRedirectResponse())->setURI($uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$post) {
|
if (!$post) {
|
||||||
|
|
|
@ -345,8 +345,9 @@ final class PhabricatorProjectProfileController
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderSubprojectTable(
|
private function renderSubprojectTable(
|
||||||
PhabricatorObjectHandleData $handles,
|
array $handles,
|
||||||
$subprojects_phids) {
|
array $subprojects_phids) {
|
||||||
|
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
||||||
|
|
||||||
$rows = array();
|
$rows = array();
|
||||||
foreach ($subprojects_phids as $subproject_phid) {
|
foreach ($subprojects_phids as $subproject_phid) {
|
||||||
|
|
|
@ -67,19 +67,21 @@ final class PhabricatorRepositoryPullLocalDaemon
|
||||||
array(
|
array(
|
||||||
'name' => 'not',
|
'name' => 'not',
|
||||||
'param' => 'repository',
|
'param' => 'repository',
|
||||||
|
'default' => array(),
|
||||||
'repeat' => true,
|
'repeat' => true,
|
||||||
'help' => 'Do not pull __repository__.',
|
'help' => 'Do not pull __repository__.',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => 'repositories',
|
'name' => 'repositories',
|
||||||
|
'default' => array(),
|
||||||
'wildcard' => true,
|
'wildcard' => true,
|
||||||
'help' => 'Pull specific __repositories__ instead of all.',
|
'help' => 'Pull specific __repositories__ instead of all.',
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
$no_discovery = $args->getArg('no-discovery');
|
$no_discovery = $args->getArg('no-discovery');
|
||||||
$repo_names = $args->getArg('repositories', array());
|
$repo_names = $args->getArg('repositories');
|
||||||
$exclude_names = $args->getArg('not', array());
|
$exclude_names = $args->getArg('not');
|
||||||
|
|
||||||
// Each repository has an individual pull frequency; after we pull it,
|
// Each repository has an individual pull frequency; after we pull it,
|
||||||
// wait that long to pull it again. When we start up, try to pull everything
|
// wait that long to pull it again. When we start up, try to pull everything
|
||||||
|
|
|
@ -94,7 +94,7 @@ final class PhabricatorJumpNavHandler {
|
||||||
private static function findCloselyNamedProject($name) {
|
private static function findCloselyNamedProject($name) {
|
||||||
$project = id(new PhabricatorProject())->loadOneWhere(
|
$project = id(new PhabricatorProject())->loadOneWhere(
|
||||||
'name = %s',
|
'name = %s',
|
||||||
name);
|
$name);
|
||||||
if ($project) {
|
if ($project) {
|
||||||
return $project;
|
return $project;
|
||||||
} else { // no exact match, try a fuzzy match
|
} else { // no exact match, try a fuzzy match
|
||||||
|
|
|
@ -36,7 +36,7 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
|
||||||
$rows = $conn_w->getAffectedRows();
|
$rows = $conn_w->getAffectedRows();
|
||||||
|
|
||||||
if (!$rows) {
|
if (!$rows) {
|
||||||
$rows = queryfx(
|
queryfx(
|
||||||
$conn_w,
|
$conn_w,
|
||||||
'UPDATE %T SET leaseOwner = %s, leaseExpires = UNIX_TIMESTAMP() + 15
|
'UPDATE %T SET leaseOwner = %s, leaseExpires = UNIX_TIMESTAMP() + 15
|
||||||
WHERE leaseExpires < UNIX_TIMESTAMP() LIMIT 1',
|
WHERE leaseExpires < UNIX_TIMESTAMP() LIMIT 1',
|
||||||
|
|
Loading…
Reference in a new issue