1
0
Fork 0
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:
vrana 2012-06-11 16:22:08 -07:00
parent 2793828795
commit 2e484e257d
9 changed files with 20 additions and 17 deletions

View file

@ -278,7 +278,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$changeset_view->setVsMap($vs_map);
$changeset_view->setWhitespace($whitespace);
if ($repository) {
$changeset_view->setRepository($repository, $target);
$changeset_view->setRepository($repository);
}
$changeset_view->setSymbolIndexes($symbol_indexes);

View file

@ -97,7 +97,7 @@ final class HeraldActionConfig {
self::ACTION_NOTHING,
));
default:
throw new Exception("Unknown content type '{$type}'.");
throw new Exception("Unknown content type '{$content_type}'.");
}
}

View file

@ -327,7 +327,7 @@ final class ManiphestTaskEditController extends ManiphestController {
$phids = array_unique($phids);
$handles = id(new PhabricatorObjectHandleData($phids))
->loadHandles($phids);
->loadHandles();
$tvalues = mpull($handles, 'getFullName', 'getPHID');

View file

@ -29,7 +29,7 @@ extends PhabricatorOAuthServerController {
public function processRequest() {
$request = $this->getRequest();
$current_user = $request->getUser();
$server = new PhabricatorOAuthServer($current_user);
$server = new PhabricatorOAuthServer();
$panels = array();
$results = array();

View file

@ -94,10 +94,6 @@ extends PhameController {
} else if ($this->getBloggerName() && $this->getPhameTitle()) {
$phame_title = $this->getPhameTitle();
$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(
'username = %s',
$this->getBloggerName());
@ -107,7 +103,11 @@ extends PhameController {
$post = id(new PhamePost())->loadOneWhere(
'bloggerPHID = %s AND phameTitle = %s',
$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) {

View file

@ -345,8 +345,9 @@ final class PhabricatorProjectProfileController
}
private function renderSubprojectTable(
PhabricatorObjectHandleData $handles,
$subprojects_phids) {
array $handles,
array $subprojects_phids) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$rows = array();
foreach ($subprojects_phids as $subproject_phid) {

View file

@ -67,19 +67,21 @@ final class PhabricatorRepositoryPullLocalDaemon
array(
'name' => 'not',
'param' => 'repository',
'default' => array(),
'repeat' => true,
'help' => 'Do not pull __repository__.',
),
array(
'name' => 'repositories',
'default' => array(),
'wildcard' => true,
'help' => 'Pull specific __repositories__ instead of all.',
),
));
$no_discovery = $args->getArg('no-discovery');
$repo_names = $args->getArg('repositories', array());
$exclude_names = $args->getArg('not', array());
$repo_names = $args->getArg('repositories');
$exclude_names = $args->getArg('not');
// 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

View file

@ -94,7 +94,7 @@ final class PhabricatorJumpNavHandler {
private static function findCloselyNamedProject($name) {
$project = id(new PhabricatorProject())->loadOneWhere(
'name = %s',
name);
$name);
if ($project) {
return $project;
} else { // no exact match, try a fuzzy match

View file

@ -36,7 +36,7 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
$rows = $conn_w->getAffectedRows();
if (!$rows) {
$rows = queryfx(
queryfx(
$conn_w,
'UPDATE %T SET leaseOwner = %s, leaseExpires = UNIX_TIMESTAMP() + 15
WHERE leaseExpires < UNIX_TIMESTAMP() LIMIT 1',