Skip to content

Commit a22bea2

Browse files
author
epriestley
committed
Apply lint rules to Phabricator
Summary: Mostly applies a new call spacing rule; also a few things that have slipped through via pull requests and such Test Plan: `find src/ -type f -name '*.php' | xargs -n16 arc lint --output summary --apply-patches` Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D5002
1 parent 63f35ee commit a22bea2

File tree

128 files changed

+341
-662
lines changed

Some content is hidden

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

128 files changed

+341
-662
lines changed

src/applications/audit/events/AuditPeopleMenuEventListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ private function handleMenuEvent($event) {
2828
->setIsExternal(true)
2929
->setName($name)
3030
->setHref($href)
31-
->setKey($name)
32-
);
31+
->setKey($name));
3332

3433
$event->setValue('menu', $menu);
3534
}

src/applications/auth/ldap/PhabricatorLDAPProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,13 @@ public function search($query) {
269269

270270
$rows = array();
271271

272-
for($i = 0; $i < $entries['count']; $i++) {
272+
for ($i = 0; $i < $entries['count']; $i++) {
273273
$row = array();
274274
$entry = $entries[$i];
275275

276276
// Get username, email and realname
277277
$username = $entry[$this->getSearchAttribute()][0];
278-
if(empty($username)) {
278+
if (empty($username)) {
279279
continue;
280280
}
281281
$row[] = $username;

src/applications/calendar/controller/PhabricatorCalendarBrowseController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public function processRequest() {
4444
$details = "\n\n".rtrim($status->getDescription());
4545
}
4646
$event->setDescription(
47-
$status->getTerseSummary($user).$details
48-
);
47+
$status->getTerseSummary($user).$details);
4948
$event->setEventID($status->getID());
5049
$month_view->addEvent($event);
5150
}

src/applications/calendar/controller/PhabricatorCalendarDeleteStatusController.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public function processRequest() {
2828
$uri->setQueryParams(
2929
array(
3030
'deleted' => true,
31-
)
32-
);
31+
));
3332
return id(new AphrontRedirectResponse())
3433
->setURI($uri);
3534
}
@@ -40,12 +39,10 @@ public function processRequest() {
4039
$dialog->appendChild(phutil_tag(
4140
'p',
4241
array(),
43-
pht('Permanently delete this status? This action can not be undone.')
44-
));
42+
pht('Permanently delete this status? This action can not be undone.')));
4543
$dialog->addSubmitButton(pht('Delete'));
4644
$dialog->addCancelButton(
47-
$this->getApplicationURI('status/edit/'.$status->getID().'/')
48-
);
45+
$this->getApplicationURI('status/edit/'.$status->getID().'/'));
4946

5047
return id(new AphrontDialogResponse())->setDialog($dialog);
5148

src/applications/calendar/controller/PhabricatorCalendarEditStatusController.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public function processRequest() {
8585
$user,
8686
'Y'),
8787
$redirect => true,
88-
)
89-
);
88+
));
9089
return id(new AphrontRedirectResponse())
9190
->setURI($uri);
9291
}
@@ -125,8 +124,7 @@ public function processRequest() {
125124
} else {
126125
$submit->addCancelButton(
127126
$this->getApplicationURI('status/delete/'.$status->getID().'/'),
128-
pht('Delete Status')
129-
);
127+
pht('Delete Status'));
130128
}
131129
$form->appendChild($submit);
132130

@@ -138,16 +136,14 @@ public function processRequest() {
138136
id(new PhabricatorHeaderView())->setHeader($page_title),
139137
$error_view,
140138
$form,
141-
)
142-
);
139+
));
143140

144141
return $this->buildApplicationPage(
145142
$nav,
146143
array(
147144
'title' => $page_title,
148145
'device' => true
149-
)
150-
);
146+
));
151147
}
152148

153149
}

src/applications/calendar/controller/PhabricatorCalendarViewStatusController.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ public function processRequest() {
3232
array(
3333
id(new PhabricatorHeaderView())->setHeader($page_title),
3434
$status_list,
35-
)
36-
);
35+
));
3736

3837
return $this->buildApplicationPage(
3938
$nav,
4039
array(
4140
'title' => $page_title,
4241
'device' => true
43-
)
44-
);
42+
));
4543
}
4644

4745
private function buildStatusList(array $statuses) {
@@ -62,8 +60,7 @@ private function buildStatusList(array $statuses) {
6260
array(
6361
'month' => $month,
6462
'year' => $year,
65-
)
66-
);
63+
));
6764
$href = (string) $uri;
6865
}
6966
$from = phabricator_datetime($status->getDateFrom(), $user);
@@ -115,8 +112,7 @@ private function getPageTitle() {
115112
} else {
116113
$page_title = pht(
117114
'Upcoming Statuses for %s',
118-
$this->getHandle($this->phid)->getName()
119-
);
115+
$this->getHandle($this->phid)->getName());
120116
}
121117
return $page_title;
122118
}

src/applications/calendar/view/AphrontCalendarMonthView.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,14 @@ private function renderCalendarHeader(DateTime $date) {
170170
$prev_link = phutil_tag(
171171
'a',
172172
array('href' => (string) $uri->setQueryParams($query)),
173-
"\xE2\x86\x90"
174-
);
173+
"\xE2\x86\x90");
175174

176175
list($next_year, $next_month) = $this->getNextYearAndMonth();
177176
$query = array('year' => $next_year, 'month' => $next_month);
178177
$next_link = phutil_tag(
179178
'a',
180179
array('href' => (string) $uri->setQueryParams($query)),
181-
"\xE2\x86\x92"
182-
);
180+
"\xE2\x86\x92");
183181

184182
$left_th = phutil_tag('th', array(), $prev_link);
185183
$right_th = phutil_tag('th', array(), $next_link);

src/applications/config/controller/PhabricatorConfigAllController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public function processRequest() {
9191
array(
9292
'title' => $title,
9393
'device' => true,
94-
)
95-
);
94+
));
9695
}
9796

9897
}

src/applications/config/controller/PhabricatorConfigGroupController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ public function processRequest() {
4646
array(
4747
'title' => $title,
4848
'device' => true,
49-
)
50-
);
49+
));
5150
}
5251

5352
private function buildOptionList(array $options) {

src/applications/config/controller/PhabricatorConfigIssueListController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public function processRequest() {
4141
array(
4242
'title' => $title,
4343
'device' => true,
44-
)
45-
);
44+
));
4645
}
4746

4847
private function buildIssueList(array $issues) {

0 commit comments

Comments
 (0)