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
This commit is contained in:
@@ -88,8 +88,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
'Redirect URI must be a fully qualified domain name '.
|
||||
'with no fragments. See '.
|
||||
'http://tools.ietf.org/html/draft-ietf-oauth-v2-23#section-3.1.2 '.
|
||||
'for more information on the correct format.'
|
||||
);
|
||||
'for more information on the correct format.');
|
||||
$bad_redirect = true;
|
||||
} else {
|
||||
$client->save();
|
||||
@@ -124,20 +123,17 @@ extends PhabricatorOAuthClientBaseController {
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Name')
|
||||
->setName('name')
|
||||
->setValue($client->getName())
|
||||
);
|
||||
->setValue($client->getName()));
|
||||
if ($this->isClientEdit()) {
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('ID')
|
||||
->setValue($phid)
|
||||
)
|
||||
->setValue($phid))
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Secret')
|
||||
->setValue($client->getSecret())
|
||||
);
|
||||
->setValue($client->getSecret()));
|
||||
}
|
||||
$form
|
||||
->appendChild(
|
||||
@@ -145,8 +141,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
->setLabel('Redirect URI')
|
||||
->setName('redirect_uri')
|
||||
->setValue($client->getRedirectURI())
|
||||
->setError($bad_redirect)
|
||||
);
|
||||
->setError($bad_redirect));
|
||||
if ($this->isClientEdit()) {
|
||||
$created = phabricator_datetime($client->getDateCreated(),
|
||||
$current_user);
|
||||
@@ -156,27 +151,23 @@ extends PhabricatorOAuthClientBaseController {
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Created')
|
||||
->setValue($created)
|
||||
)
|
||||
->setValue($created))
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Last Updated')
|
||||
->setValue($updated)
|
||||
);
|
||||
->setValue($updated));
|
||||
}
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue($submit_button)
|
||||
);
|
||||
->setValue($submit_button));
|
||||
|
||||
$panel->appendChild($form);
|
||||
return $this->buildStandardPageResponse(
|
||||
array($error,
|
||||
$panel
|
||||
),
|
||||
array('title' => $title)
|
||||
);
|
||||
array('title' => $title));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,8 +36,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
array(
|
||||
'href' => $client->getViewURI(),
|
||||
),
|
||||
$client->getName()
|
||||
),
|
||||
$client->getName()),
|
||||
$client->getPHID(),
|
||||
$client->getSecret(),
|
||||
phutil_tag(
|
||||
@@ -45,16 +44,14 @@ extends PhabricatorOAuthClientBaseController {
|
||||
array(
|
||||
'href' => $client->getRedirectURI(),
|
||||
),
|
||||
$client->getRedirectURI()
|
||||
),
|
||||
$client->getRedirectURI()),
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'small button grey',
|
||||
'href' => $client->getEditURI(),
|
||||
),
|
||||
'Edit'
|
||||
),
|
||||
'Edit'),
|
||||
);
|
||||
|
||||
$rows[] = $row;
|
||||
@@ -72,8 +69,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
$this->getNoticeView(),
|
||||
$panel->appendChild($pager)
|
||||
),
|
||||
array('title' => $title)
|
||||
);
|
||||
array('title' => $title));
|
||||
}
|
||||
|
||||
private function buildClientList($rows, $rowc, $title) {
|
||||
@@ -97,8 +93,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
));
|
||||
if (empty($rows)) {
|
||||
$table->setNoDataString(
|
||||
'You have not created any clients for this OAuthServer.'
|
||||
);
|
||||
'You have not created any clients for this OAuthServer.');
|
||||
}
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
|
||||
@@ -33,8 +33,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
$message = 'No client found with id '.$phid.'.';
|
||||
return $this->buildStandardPageResponse(
|
||||
$this->buildErrorView($message),
|
||||
array('title' => $title)
|
||||
);
|
||||
array('title' => $title));
|
||||
}
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
@@ -45,27 +44,23 @@ extends PhabricatorOAuthClientBaseController {
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Name')
|
||||
->setValue($client->getName())
|
||||
)
|
||||
->setValue($client->getName()))
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('ID')
|
||||
->setValue($phid)
|
||||
);
|
||||
->setValue($phid));
|
||||
if ($current_user->getPHID() == $client->getCreatorPHID()) {
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Secret')
|
||||
->setValue($client->getSecret())
|
||||
);
|
||||
->setValue($client->getSecret()));
|
||||
}
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Redirect URI')
|
||||
->setValue($client->getRedirectURI())
|
||||
);
|
||||
->setValue($client->getRedirectURI()));
|
||||
$created = phabricator_datetime($client->getDateCreated(),
|
||||
$current_user);
|
||||
$updated = phabricator_datetime($client->getDateModified(),
|
||||
@@ -74,13 +69,11 @@ extends PhabricatorOAuthClientBaseController {
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Created')
|
||||
->setValue($created)
|
||||
)
|
||||
->setValue($created))
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Last Updated')
|
||||
->setValue($updated)
|
||||
);
|
||||
->setValue($updated));
|
||||
$panel->appendChild($form);
|
||||
$admin_panel = null;
|
||||
if ($client->getCreatorPHID() == $current_user->getPHID()) {
|
||||
@@ -100,8 +93,7 @@ extends PhabricatorOAuthClientBaseController {
|
||||
->setAction('/oauthserver/test/')
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Create Scopeless Test Authorization')
|
||||
);
|
||||
->setValue('Create Scopeless Test Authorization'));
|
||||
$admin_panel = id(new AphrontPanelView())
|
||||
->setHeader('Admin Tools')
|
||||
->appendChild($create_authorization_form);
|
||||
@@ -112,7 +104,6 @@ extends PhabricatorOAuthClientBaseController {
|
||||
$panel,
|
||||
$admin_panel
|
||||
),
|
||||
array('title' => $title)
|
||||
);
|
||||
array('title' => $title));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user