Skip to content

Commit d0128af

Browse files
joshuaspenceepriestley
authored andcommitted
Applied various linter fixes.
Summary: Applied some more linter fixes that I previously missed because my global `arc` install was out-of-date. Test Plan: Will run `arc unit` on another host. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9443
1 parent 7f1c079 commit d0128af

File tree

44 files changed

+83
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+83
-86
lines changed

resources/sql/patches/098.heraldruletypemigration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
$rule->getRuleType(),
4242
$rule->getID());
4343

44-
echo "Setting rule '" . $rule->getName() . "' to personal. ";
44+
echo "Setting rule '".$rule->getName()."' to personal. ";
4545
}
4646
}
4747
}

scripts/aphront/aphrontpath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
list($controller) = $application->buildControllerForPath($path.'/');
2323
}
2424
if ($controller) {
25-
echo get_class($controller) . "\n";
25+
echo get_class($controller)."\n";
2626
}

scripts/symbols/generate_ctags_symbols.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function print_symbol($file, $line_num, $type, $token, $context, $language) {
110110
if ($file[0] == '.' || $file[0] == '..') {
111111
array_shift($file);
112112
}
113-
$file = '/' . implode('/', $file);
113+
$file = '/'.implode('/', $file);
114114

115115
$parts = array(
116116
$context,

src/aphront/AphrontRequest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,19 @@ final public function validateCSRF() {
231231
if (PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) {
232232
// TODO: Clean this up, see T1921.
233233
$more_info[] =
234-
"To avoid this error, use phabricator_form() to construct forms. " .
235-
"If you are already using phabricator_form(), make sure the form " .
236-
"'action' uses a relative URI (i.e., begins with a '/'). Forms " .
237-
"using absolute URIs do not include CSRF tokens, to prevent " .
238-
"leaking tokens to external sites.\n\n" .
239-
"If this page performs writes which do not require CSRF " .
240-
"protection (usually, filling caches or logging), you can use " .
241-
"AphrontWriteGuard::beginScopedUnguardedWrites() to temporarily " .
242-
"bypass CSRF protection while writing. You should use this only " .
243-
"for writes which can not be protected with normal CSRF " .
244-
"mechanisms.\n\n" .
245-
"Some UI elements (like PhabricatorActionListView) also have " .
246-
"methods which will allow you to render links as forms (like " .
234+
"To avoid this error, use phabricator_form() to construct forms. ".
235+
"If you are already using phabricator_form(), make sure the form ".
236+
"'action' uses a relative URI (i.e., begins with a '/'). Forms ".
237+
"using absolute URIs do not include CSRF tokens, to prevent ".
238+
"leaking tokens to external sites.\n\n".
239+
"If this page performs writes which do not require CSRF ".
240+
"protection (usually, filling caches or logging), you can use ".
241+
"AphrontWriteGuard::beginScopedUnguardedWrites() to temporarily ".
242+
"bypass CSRF protection while writing. You should use this only ".
243+
"for writes which can not be protected with normal CSRF ".
244+
"mechanisms.\n\n".
245+
"Some UI elements (like PhabricatorActionListView) also have ".
246+
"methods which will allow you to render links as forms (like ".
247247
"setRenderAsForm(true)).";
248248
}
249249

src/applications/audit/editor/PhabricatorAuditCommentEditor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function addComment(PhabricatorAuditComment $comment) {
261261
->setAuditorPHID($auditor_phid)
262262
->setAuditStatus($audit_requested)
263263
->setAuditReasons(
264-
array('Added by ' . $actor->getUsername()))
264+
array('Added by '.$actor->getUsername()))
265265
->save();
266266
}
267267
}
@@ -274,7 +274,7 @@ public function addComment(PhabricatorAuditComment $comment) {
274274
->setAuditorPHID($cc_phid)
275275
->setAuditStatus($audit_cc)
276276
->setAuditReasons(
277-
array('Added by ' . $actor->getUsername()))
277+
array('Added by '.$actor->getUsername()))
278278
->save();
279279
}
280280
}

src/applications/auth/provider/PhabricatorAuthProviderOAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function processOAuthEditForm(
8181
public function getConfigurationHelp() {
8282
$help = $this->getProviderConfigurationHelp();
8383

84-
return $help . "\n\n" .
84+
return $help."\n\n".
8585
pht('Use the **OAuth App Notes** field to record details about which '.
8686
'account the external application is registered under.');
8787
}

src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function processRequest() {
152152
array(
153153
'href' => $first_uri,
154154
),
155-
"\xC2\xAB ". pht('Newest'));
155+
"\xC2\xAB ".pht('Newest'));
156156
}
157157

158158
$prev_uri = $pager->getPrevPageURI();
@@ -162,7 +162,7 @@ public function processRequest() {
162162
array(
163163
'href' => $prev_uri,
164164
),
165-
"\xE2\x80\xB9 " . pht('Newer'));
165+
"\xE2\x80\xB9 ".pht('Newer'));
166166
}
167167

168168
$next_uri = $pager->getNextPageURI();
@@ -172,7 +172,7 @@ public function processRequest() {
172172
array(
173173
'href' => $next_uri,
174174
),
175-
pht('Older') . " \xE2\x80\xBA");
175+
pht('Older')." \xE2\x80\xBA");
176176
}
177177

178178
$pager_top = phutil_tag(
@@ -224,7 +224,7 @@ public function processRequest() {
224224
array(
225225
'href' => '#latest'
226226
),
227-
pht('Jump to Bottom') . " \xE2\x96\xBE");
227+
pht('Jump to Bottom')." \xE2\x96\xBE");
228228

229229
$jump = phutil_tag(
230230
'div',

src/applications/conduit/call/ConduitCall.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function __construct($method, array $params) {
2727
$this->handler->defineParamTypes());
2828
if ($invalid_params) {
2929
throw new ConduitException(
30-
"Method '{$method}' doesn't define these parameters: '" .
31-
implode("', '", array_keys($invalid_params)) . "'.");
30+
"Method '{$method}' doesn't define these parameters: '".
31+
implode("', '", array_keys($invalid_params))."'.");
3232
}
3333

3434
if ($this->servers) {

src/applications/config/controller/PhabricatorConfigIgnoreController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function processRequest() {
3434
'This issue will no longer be suppressed, and will return to its '.
3535
'rightful place as a global setup warning.');
3636
} else {
37-
throw new Exception('Unrecognized verb: ' . $this->verb);
37+
throw new Exception('Unrecognized verb: '.$this->verb);
3838
}
3939

4040
$dialog = id(new AphrontDialogView())

src/applications/conpherence/controller/ConpherenceWidgetController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ private function renderCalendarWidgetPaneContent() {
274274
phabricator_format_local_time(
275275
$status->getDateFrom(),
276276
$user,
277-
$time_str) .
278-
' - ' .
277+
$time_str).
278+
' - '.
279279
phabricator_format_local_time(
280280
$status->getDateTo(),
281281
$user,

src/applications/conpherence/view/ConpherenceLayoutView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function render() {
5959
$selected_id = null;
6060
$selected_thread_id = null;
6161
if ($this->thread) {
62-
$selected_id = $this->thread->getPHID() . '-nav-item';
62+
$selected_id = $this->thread->getPHID().'-nav-item';
6363
$selected_thread_id = $this->thread->getID();
6464
}
6565
$this->initBehavior('conpherence-menu',
@@ -77,7 +77,7 @@ public function render() {
7777
$this->initBehavior(
7878
'conpherence-widget-pane',
7979
array(
80-
'widgetBaseUpdateURI' => $this->baseURI . 'update/',
80+
'widgetBaseUpdateURI' => $this->baseURI.'update/',
8181
'widgetRegistry' => array(
8282
'conpherence-message-pane' => array(
8383
'name' => pht('Thread'),

src/applications/dashboard/controller/PhabricatorDashboardViewController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function buildEmptyView() {
7070
'yet. Use %s to add panels.',
7171
phutil_tag(
7272
'a',
73-
array('href'=>$manage_uri),
73+
array('href' => $manage_uri),
7474
pht('Manage Dashboard'))));
7575
}
7676

src/applications/differential/DifferentialGetWorkingCopy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static function getCleanGitWorkspace(
1717
$origin_path = $repo->getLocalPath();
1818

1919
$path = rtrim($origin_path, '/');
20-
$path = $path . '__workspace';
20+
$path = $path.'__workspace';
2121

2222
if (!Filesystem::pathExists($path)) {
2323
$repo->execxLocalCommand(
@@ -53,7 +53,7 @@ public static function getCleanMercurialWorkspace(
5353
$origin_path = $repo->getLocalPath();
5454

5555
$path = rtrim($origin_path, '/');
56-
$path = $path . '__workspace';
56+
$path = $path.'__workspace';
5757

5858
if (!Filesystem::pathExists($path)) {
5959
$repo->execxLocalCommand(

src/applications/differential/editor/DifferentialTransactionEditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ private function renderInlineCommentsForMail(
13221322
$result[] = "{$file}:{$range} {$inline_content}";
13231323
} else {
13241324
$result[] = '================';
1325-
$result[] = 'Comment at: ' . $file . ':' . $range;
1325+
$result[] = 'Comment at: '.$file.':'.$range;
13261326
$result[] = $hunk_parser->makeContextDiff(
13271327
$changeset->getHunks(),
13281328
$comment->getIsNewFile(),

src/applications/differential/landing/DifferentialLandingToHostedGit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function commitRevisionToWorkspace(
5353

5454
$missing_binary =
5555
"\nindex "
56-
. "0000000000000000000000000000000000000000.."
57-
. "0000000000000000000000000000000000000000\n";
56+
."0000000000000000000000000000000000000000.."
57+
."0000000000000000000000000000000000000000\n";
5858
if (strpos($raw_diff, $missing_binary) !== false) {
5959
throw new Exception('Patch is missing content for a binary file');
6060
}
@@ -85,7 +85,7 @@ public function commitRevisionToWorkspace(
8585
$author_date = $revision->getDateCreated();
8686

8787
$workspace->execxLocal(
88-
'-c user.name=%s -c user.email=%s ' .
88+
'-c user.name=%s -c user.email=%s '.
8989
'commit --date=%s --author=%s '.
9090
'--message=%s',
9191
// -c will set the 'committer'

src/applications/differential/mail/DifferentialReplyHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ public function handleAction($body, array $attachments) {
105105
// unrecognized commands will be parsed as part of the comment.
106106
$command = DifferentialAction::ACTION_COMMENT;
107107
$supported_commands = $this->getSupportedCommands();
108-
$regex = "/\A\n*!(" . implode('|', $supported_commands) . ")\n*/";
108+
$regex = "/\A\n*!(".implode('|', $supported_commands).")\n*/";
109109
$matches = array();
110110
if (preg_match($regex, $body, $matches)) {
111111
$command = $matches[1];
112-
$body = trim(str_replace('!' . $command, '', $body));
112+
$body = trim(str_replace('!'.$command, '', $body));
113113
}
114114

115115
$actor = $this->getActor();

src/applications/differential/parser/DifferentialHunkParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,12 @@ public function makeContextDiff(
638638
if ($hunk_offset['-'] !== null || $hunk_offset['+'] !== null) {
639639
$header = '@@';
640640
if ($hunk_offset['-'] !== null) {
641-
$header .= ' -' . ($hunk->getOldOffset() + $hunk_offset['-']) .
642-
',' . ($hunk_last['-'] - $hunk_offset['-'] + 1);
641+
$header .= ' -'.($hunk->getOldOffset() + $hunk_offset['-']).
642+
','.($hunk_last['-'] - $hunk_offset['-'] + 1);
643643
}
644644
if ($hunk_offset['+'] !== null) {
645-
$header .= ' +' . ($hunk->getNewOffset() + $hunk_offset['+']) .
646-
',' . ($hunk_last['+'] - $hunk_offset['+'] + 1);
645+
$header .= ' +'.($hunk->getNewOffset() + $hunk_offset['+']).
646+
','.($hunk_last['+'] - $hunk_offset['+'] + 1);
647647
}
648648
$header .= ' @@';
649649
$context[] = $header;

src/applications/differential/parser/__tests__/data/missing_context.diff

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ index a1f7255..b5fb7b8 100644
88
fig
99
-grape
1010
honeydew
11-

src/applications/differential/parser/__tests__/data/missing_context_2.diff

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ index a1f7255..fa84742 100644
99
+guava
1010
+gooseberry
1111
honeydew
12-

src/applications/differential/parser/__tests__/data/missing_context_3.diff

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ index bf66874..071dd49 100644
1515
banana
1616
grape
1717
-honeydew
18-

src/applications/differential/view/DifferentialInlineCommentView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function render() {
7575

7676
$sigil = 'differential-inline-comment';
7777
if ($this->preview) {
78-
$sigil = $sigil . ' differential-inline-comment-preview';
78+
$sigil = $sigil.' differential-inline-comment-preview';
7979
}
8080

8181
$content = $inline->getContent();

src/applications/diffusion/protocol/__tests__/DiffusionSubversionWireProtocolTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSubversionWireProtocolPartialFrame() {
7878
'value' => 'duck',
7979
),
8080
array(
81-
'type'=> 'string',
81+
'type' => 'string',
8282
'value' => 'quack',
8383
),
8484
),

src/applications/diffusion/request/DiffusionRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,8 @@ protected function raisePermissionException() {
691691
$host = php_uname('n');
692692
$callsign = $this->getRepository()->getCallsign();
693693
throw new DiffusionSetupException(
694-
"The clone of this repository ('{$callsign}') on the local machine " .
695-
"('{$host}') could not be read. Ensure that the repository is in a " .
694+
"The clone of this repository ('{$callsign}') on the local machine ".
695+
"('{$host}') could not be read. Ensure that the repository is in a ".
696696
"location where the web server has read permissions.");
697697
}
698698

src/applications/diffusion/view/DiffusionView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ final public static function linkCommit(
120120
$callsign = $repository->getCallsign();
121121

122122
if (strlen($summary)) {
123-
$commit_name .= ': ' . $summary;
123+
$commit_name .= ': '.$summary;
124124
}
125125

126126
return phutil_tag(

src/applications/feed/conduit/ConduitAPI_feed_query_Method.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function defineErrorTypes() {
4444

4545
return array(
4646
'ERR-UNKNOWN-TYPE' =>
47-
'Unsupported view type, possibles are: ' . $view_types
47+
'Unsupported view type, possibles are: '.$view_types
4848
);
4949
}
5050

src/applications/herald/adapter/HeraldAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public function doesConditionMatch(
483483
// We add the 'S' flag because we use the regexp multiple times.
484484
// It shouldn't cause any troubles if the flag is already there
485485
// - /.*/S is evaluated same as /.*/SS.
486-
$result = @preg_match($condition_value . 'S', $value);
486+
$result = @preg_match($condition_value.'S', $value);
487487
if ($result === false) {
488488
throw new HeraldInvalidConditionException(
489489
'Regular expression is not valid!');

src/applications/herald/controller/HeraldRuleController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ private function loadRulesThisRuleMayDependUpon(HeraldRule $rule) {
643643
foreach ($all_rules as $current_rule) {
644644
if ($current_rule->getIsDisabled()) {
645645
$current_rule->makeEphemeral();
646-
$current_rule->setName($rule->getName(). ' '.pht('(Disabled)'));
646+
$current_rule->setName($rule->getName().' '.pht('(Disabled)'));
647647
}
648648
}
649649

src/applications/meta/controller/PhabricatorApplicationUninstallController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function processRequest() {
5454
if ($selected->canUninstall()) {
5555
$dialog->setTitle('Confirmation')
5656
->appendChild(
57-
'Install '. $selected->getName(). ' application?')
57+
'Install '.$selected->getName().' application?')
5858
->addSubmitButton('Install');
5959

6060
} else {
@@ -65,7 +65,7 @@ public function processRequest() {
6565
if ($selected->canUninstall()) {
6666
$dialog->setTitle('Confirmation')
6767
->appendChild(
68-
'Really Uninstall '. $selected->getName(). ' application?')
68+
'Really Uninstall '.$selected->getName().' application?')
6969
->addSubmitButton('Uninstall');
7070
} else {
7171
$dialog->setTitle('Information')

src/applications/metamta/parser/__tests__/PhabricatorMetaMTAEmailBodyParserTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private function getEmailBodiesWithFullCommands() {
4949
$bodies = $this->getEmailBodies();
5050
$with_commands = array();
5151
foreach ($bodies as $body) {
52-
$with_commands[] = "!whatevs dude\n" . $body;
52+
$with_commands[] = "!whatevs dude\n".$body;
5353
}
5454
return $with_commands;
5555
}
@@ -58,7 +58,7 @@ private function getEmailBodiesWithPartialCommands() {
5858
$bodies = $this->getEmailBodies();
5959
$with_commands = array();
6060
foreach ($bodies as $body) {
61-
$with_commands[] = "!whatevs\n" . $body;
61+
$with_commands[] = "!whatevs\n".$body;
6262
}
6363
return $with_commands;
6464
}

src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ protected function getSingleReplyHandlerPrefix($address) {
239239
$single_handle_prefix = PhabricatorEnv::getEnvConfig(
240240
'metamta.single-reply-handler-prefix');
241241
return ($single_handle_prefix)
242-
? $single_handle_prefix . '+' . $address
242+
? $single_handle_prefix.'+'.$address
243243
: $address;
244244
}
245245

0 commit comments

Comments
 (0)