Skip to content

Commit 2e484e2

Browse files
author
vrana
committed
Fix lint errors found by Nemo
Summary: See also: - tpyo/amazon-s3-php-class#33 - stripe/stripe-php#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
1 parent 2793828 commit 2e484e2

File tree

9 files changed

+20
-17
lines changed

9 files changed

+20
-17
lines changed

src/applications/differential/controller/DifferentialRevisionViewController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public function processRequest() {
278278
$changeset_view->setVsMap($vs_map);
279279
$changeset_view->setWhitespace($whitespace);
280280
if ($repository) {
281-
$changeset_view->setRepository($repository, $target);
281+
$changeset_view->setRepository($repository);
282282
}
283283
$changeset_view->setSymbolIndexes($symbol_indexes);
284284

src/applications/herald/config/HeraldActionConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static function getActionMessageMap($content_type,
9797
self::ACTION_NOTHING,
9898
));
9999
default:
100-
throw new Exception("Unknown content type '{$type}'.");
100+
throw new Exception("Unknown content type '{$content_type}'.");
101101
}
102102
}
103103

src/applications/maniphest/controller/ManiphestTaskEditController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public function processRequest() {
327327
$phids = array_unique($phids);
328328

329329
$handles = id(new PhabricatorObjectHandleData($phids))
330-
->loadHandles($phids);
330+
->loadHandles();
331331

332332
$tvalues = mpull($handles, 'getFullName', 'getPHID');
333333

src/applications/oauthserver/controller/PhabricatorOAuthServerTestController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function shouldRequireLogin() {
2929
public function processRequest() {
3030
$request = $this->getRequest();
3131
$current_user = $request->getUser();
32-
$server = new PhabricatorOAuthServer($current_user);
32+
$server = new PhabricatorOAuthServer();
3333
$panels = array();
3434
$results = array();
3535

src/applications/phame/controller/post/PhamePostViewController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ public function processRequest() {
9494
} else if ($this->getBloggerName() && $this->getPhameTitle()) {
9595
$phame_title = $this->getPhameTitle();
9696
$phame_title = PhabricatorSlug::normalize($phame_title);
97-
if ($phame_title != $this->getPhameTitle()) {
98-
$uri = $post->getViewURI($this->getBloggerName());
99-
return id(new AphrontRedirectResponse())->setURI($uri);
100-
}
10197
$blogger = id(new PhabricatorUser())->loadOneWhere(
10298
'username = %s',
10399
$this->getBloggerName());
@@ -107,7 +103,11 @@ public function processRequest() {
107103
$post = id(new PhamePost())->loadOneWhere(
108104
'bloggerPHID = %s AND phameTitle = %s',
109105
$blogger->getPHID(),
110-
$this->getPhameTitle());
106+
$phame_title);
107+
if ($post && $phame_title != $this->getPhameTitle()) {
108+
$uri = $post->getViewURI($this->getBloggerName());
109+
return id(new AphrontRedirectResponse())->setURI($uri);
110+
}
111111
}
112112

113113
if (!$post) {

src/applications/project/controller/PhabricatorProjectProfileController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ private function renderTasksPage(
345345
}
346346

347347
private function renderSubprojectTable(
348-
PhabricatorObjectHandleData $handles,
349-
$subprojects_phids) {
348+
array $handles,
349+
array $subprojects_phids) {
350+
assert_instances_of($handles, 'PhabricatorObjectHandle');
350351

351352
$rows = array();
352353
foreach ($subprojects_phids as $subproject_phid) {

src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,21 @@ public function run() {
6767
array(
6868
'name' => 'not',
6969
'param' => 'repository',
70+
'default' => array(),
7071
'repeat' => true,
7172
'help' => 'Do not pull __repository__.',
7273
),
7374
array(
7475
'name' => 'repositories',
76+
'default' => array(),
7577
'wildcard' => true,
7678
'help' => 'Pull specific __repositories__ instead of all.',
7779
),
7880
));
7981

8082
$no_discovery = $args->getArg('no-discovery');
81-
$repo_names = $args->getArg('repositories', array());
82-
$exclude_names = $args->getArg('not', array());
83+
$repo_names = $args->getArg('repositories');
84+
$exclude_names = $args->getArg('not');
8385

8486
// Each repository has an individual pull frequency; after we pull it,
8587
// wait that long to pull it again. When we start up, try to pull everything

src/applications/search/engine/PhabricatorJumpNavHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static function jumpPostResponse($jump) {
9494
private static function findCloselyNamedProject($name) {
9595
$project = id(new PhabricatorProject())->loadOneWhere(
9696
'name = %s',
97-
name);
97+
$name);
9898
if ($project) {
9999
return $project;
100100
} else { // no exact match, try a fuzzy match

src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ public function run() {
3636
$rows = $conn_w->getAffectedRows();
3737

3838
if (!$rows) {
39-
$rows = queryfx(
39+
queryfx(
4040
$conn_w,
4141
'UPDATE %T SET leaseOwner = %s, leaseExpires = UNIX_TIMESTAMP() + 15
4242
WHERE leaseExpires < UNIX_TIMESTAMP() LIMIT 1',
43-
$task_table->getTableName(),
44-
$lease_ownership_name);
43+
$task_table->getTableName(),
44+
$lease_ownership_name);
4545
$rows = $conn_w->getAffectedRows();
4646
}
4747

0 commit comments

Comments
 (0)