Skip to content

Commit 5d1f94a

Browse files
author
epriestley
committed
Fix some Phabricator lint warnings
Summary: Lint. Test Plan: Lint. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6127
1 parent d9848d3 commit 5d1f94a

File tree

10 files changed

+18
-20
lines changed

10 files changed

+18
-20
lines changed

scripts/user/account_admin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@
113113
if (!$verify_email->getIsVerified()) {
114114
$set_verified = phutil_console_confirm(
115115
'Should the primary email address be verified?',
116-
$default_no = true
117-
);
116+
$default_no = true);
118117
} else {
119118
// already verified so let's not make a fuss
120119
$verify_email = null;

src/applications/differential/parser/DifferentialHunkParser.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ public function makeContextDiff(
585585
$end = $end + $add_context;
586586
$hunk_content = array();
587587
$hunk_pos = array( "-" => 0, "+" => 0 );
588-
$hunk_offset = array( "-" => NULL, "+" => NULL );
589-
$hunk_last = array( "-" => NULL, "+" => NULL );
588+
$hunk_offset = array( "-" => null, "+" => null );
589+
$hunk_last = array( "-" => null, "+" => null );
590590
foreach (explode("\n", $hunk->getChanges()) as $line) {
591591
$in_common = strncmp($line, " ", 1) === 0;
592592
$in_old = strncmp($line, "-", 1) === 0 || $in_common;
@@ -598,13 +598,13 @@ public function makeContextDiff(
598598
if (!$skip || ($hunk_pos[$prefix] != $start &&
599599
$hunk_pos[$prefix] != $end)) {
600600
if ($in_old) {
601-
if ($hunk_offset["-"] === NULL) {
601+
if ($hunk_offset["-"] === null) {
602602
$hunk_offset["-"] = $hunk_pos["-"];
603603
}
604604
$hunk_last["-"] = $hunk_pos["-"];
605605
}
606606
if ($in_new) {
607-
if ($hunk_offset["+"] === NULL) {
607+
if ($hunk_offset["+"] === null) {
608608
$hunk_offset["+"] = $hunk_pos["+"];
609609
}
610610
$hunk_last["+"] = $hunk_pos["+"];
@@ -617,13 +617,13 @@ public function makeContextDiff(
617617
if ($in_new) { ++$hunk_pos["+"]; }
618618
}
619619
}
620-
if ($hunk_offset["-"] !== NULL || $hunk_offset["+"] !== NULL) {
620+
if ($hunk_offset["-"] !== null || $hunk_offset["+"] !== null) {
621621
$header = "@@";
622-
if ($hunk_offset["-"] !== NULL) {
622+
if ($hunk_offset["-"] !== null) {
623623
$header .= " -" . ($hunk->getOldOffset() + $hunk_offset["-"]) .
624624
"," . ($hunk_last["-"] - $hunk_offset["-"] + 1);
625625
}
626-
if ($hunk_offset["+"] !== NULL) {
626+
if ($hunk_offset["+"] !== null) {
627627
$header .= " +" . ($hunk->getNewOffset() + $hunk_offset["+"]) .
628628
"," . ($hunk_last["+"] - $hunk_offset["+"] + 1);
629629
}

src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private function createComment() {
99
// $length: 0 based (0 meaning 1 line)
1010
private function createNewComment($line, $length) {
1111
$comment = $this->createComment();
12-
$comment->setIsNewFile(True);
12+
$comment->setIsNewFile(true);
1313
$comment->setLineNumber($line);
1414
$comment->setLineLength($length);
1515
return $comment;
@@ -18,7 +18,7 @@ private function createNewComment($line, $length) {
1818
// $length: 0 based (0 meaning 1 line)
1919
private function createOldComment($line, $length) {
2020
$comment = $this->createComment();
21-
$comment->setIsNewFile(False);
21+
$comment->setIsNewFile(false);
2222
$comment->setLineNumber($line);
2323
$comment->setLineLength($length);
2424
return $comment;

src/applications/phid/PhabricatorObjectHandle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ public function getFullName() {
6161
}
6262
return $this->getName();
6363
}
64-
64+
6565
public function setTitle($title) {
6666
$this->title = $title;
6767
return $this;
6868
}
69-
69+
7070
public function getTitle() {
7171
return $this->title;
7272
}

src/applications/pholio/editor/PholioMockEditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected function sortTransactions(array $xactions) {
144144
$head = array();
145145
$tail = array();
146146

147-
// Move inline comments to the end, so the comments preceed them.
147+
// Move inline comments to the end, so the comments precede them.
148148
foreach ($xactions as $xaction) {
149149
$type = $xaction->getTransactionType();
150150
if ($type == PholioTransactionType::TYPE_INLINE) {

src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ protected function sortTransactions(array $xactions) {
841841
$head = array();
842842
$tail = array();
843843

844-
// Move bare comments to the end, so the actions preceed them.
844+
// Move bare comments to the end, so the actions precede them.
845845
foreach ($xactions as $xaction) {
846846
$type = $xaction->getTransactionType();
847847
if ($type == PhabricatorTransactions::TYPE_COMMENT) {

src/infrastructure/daemon/bot/adapter/PhabricatorBotBaseStreamingProtocolAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function processReadBuffer() {
131131
return false;
132132
}
133133

134-
protected function performPost($endpoint, $data = Null) {
134+
protected function performPost($endpoint, $data = null) {
135135
$uri = new PhutilURI($this->server);
136136
$uri->setPath($endpoint);
137137

src/infrastructure/edges/editor/PhabricatorEdgeEditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private function killTransactions() {
355355
* response to edits, and is primarily useful when performing migrations. You
356356
* should not normally need to use it.
357357
*
358-
* @param bool True to supress events related to edits.
358+
* @param bool True to suppress events related to edits.
359359
* @return this
360360
* @task internal
361361
*/

src/view/layout/PhabricatorCrumbsView.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public function render() {
4747
array(
4848
'class' => 'phabricator-crumbs-action-name'
4949
),
50-
$action->getName()
51-
);
50+
$action->getName());
5251

5352
$action_sigils = $action->getSigils();
5453
if ($action->getWorkflow()) {

src/view/phui/PHUIFeedStoryView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function render() {
208208
}
209209

210210
public function setAppIconFromPHID($phid) {
211-
switch(phid_get_type($phid)) {
211+
switch (phid_get_type($phid)) {
212212
case PhabricatorPHIDConstants::PHID_TYPE_MOCK:
213213
$this->setAppIcon("pholio-dark");
214214
break;

0 commit comments

Comments
 (0)