mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 12:41:19 +01:00
Various linter fixes
Summary: Self explanatory. Test Plan: `arc lint` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D13863
This commit is contained in:
parent
5485fb8aa9
commit
2cf9ded878
15 changed files with 78 additions and 46 deletions
|
@ -246,7 +246,8 @@ abstract class AphrontApplicationConfiguration extends Phobject {
|
|||
if ($response instanceof AphrontWebpageResponse) {
|
||||
echo phutil_tag(
|
||||
'div',
|
||||
array('style' =>
|
||||
array(
|
||||
'style' =>
|
||||
'background: #eeddff;'.
|
||||
'white-space: pre-wrap;'.
|
||||
'z-index: 200000;'.
|
||||
|
|
|
@ -7,7 +7,8 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
|
|||
ConpherenceThread $conpherence,
|
||||
array $participant_phids) {
|
||||
|
||||
$xactions = array(id(new ConpherenceTransaction())
|
||||
$xactions = array(
|
||||
id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('+' => $participant_phids)),
|
||||
);
|
||||
|
@ -23,7 +24,8 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
|
|||
ConpherenceThread $conpherence,
|
||||
array $participant_phids) {
|
||||
|
||||
$xactions = array(id(new ConpherenceTransaction())
|
||||
$xactions = array(
|
||||
id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('-' => $participant_phids)),
|
||||
);
|
||||
|
|
|
@ -143,7 +143,8 @@ final class DifferentialCreateDiffConduitAPIMethod
|
|||
'unitStatus' => $unit_status,
|
||||
);
|
||||
|
||||
$xactions = array(id(new DifferentialTransaction())
|
||||
$xactions = array(
|
||||
id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
);
|
||||
|
|
|
@ -51,7 +51,8 @@ final class DifferentialCreateRawDiffConduitAPIMethod
|
|||
'unitStatus' => DifferentialUnitStatus::UNIT_SKIP,
|
||||
);
|
||||
|
||||
$xactions = array(id(new DifferentialTransaction())
|
||||
$xactions = array(
|
||||
id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
);
|
||||
|
|
|
@ -603,9 +603,9 @@ final class DifferentialHunkParser extends Phobject {
|
|||
$start = $start - $add_context;
|
||||
$end = $end + $add_context;
|
||||
$hunk_content = array();
|
||||
$hunk_pos = array( '-' => 0, '+' => 0 );
|
||||
$hunk_offset = array( '-' => null, '+' => null );
|
||||
$hunk_last = array( '-' => null, '+' => null );
|
||||
$hunk_pos = array('-' => 0, '+' => 0);
|
||||
$hunk_offset = array('-' => null, '+' => null);
|
||||
$hunk_last = array('-' => null, '+' => null);
|
||||
foreach (explode("\n", $hunk->getChanges()) as $line) {
|
||||
$in_common = strncmp($line, ' ', 1) === 0;
|
||||
$in_old = strncmp($line, '-', 1) === 0 || $in_common;
|
||||
|
|
|
@ -219,7 +219,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
|
|||
|
||||
$revisions = $revision_query->execute();
|
||||
|
||||
list($blocking, $active, ) = DifferentialRevisionQuery::splitResponsible(
|
||||
list($blocking, $active,) = DifferentialRevisionQuery::splitResponsible(
|
||||
$revisions,
|
||||
array($user_phid));
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ final class PassphraseCredentialRevealController
|
|||
->addCancelButton($view_uri, pht('Done'));
|
||||
|
||||
$type_secret = PassphraseCredentialTransaction::TYPE_LOOKEDATSECRET;
|
||||
$xactions = array(id(new PassphraseCredentialTransaction())
|
||||
$xactions = array(
|
||||
id(new PassphraseCredentialTransaction())
|
||||
->setTransactionType($type_secret)
|
||||
->setNewValue(true),
|
||||
);
|
||||
|
|
|
@ -60,7 +60,8 @@ final class PhabricatorProjectColumnHideController
|
|||
}
|
||||
|
||||
$type_status = PhabricatorProjectColumnTransaction::TYPE_STATUS;
|
||||
$xactions = array(id(new PhabricatorProjectColumnTransaction())
|
||||
$xactions = array(
|
||||
id(new PhabricatorProjectColumnTransaction())
|
||||
->setTransactionType($type_status)
|
||||
->setNewValue($new_status),
|
||||
);
|
||||
|
|
|
@ -325,7 +325,7 @@ final class PhabricatorElasticSearchEngine extends PhabricatorSearchEngine {
|
|||
foreach ($types as $type) {
|
||||
// Use the custom trigram analyzer for the corpus of text
|
||||
$data['mappings'][$type]['properties']['field']['properties']['corpus'] =
|
||||
array( 'type' => 'string', 'analyzer' => 'custom_trigrams' );
|
||||
array('type' => 'string', 'analyzer' => 'custom_trigrams');
|
||||
|
||||
// Ensure we have dateCreated since the default query requires it
|
||||
$data['mappings'][$type]['properties']['dateCreated']['type'] = 'string';
|
||||
|
|
|
@ -68,7 +68,8 @@ final class PHUIButtonExample extends PhabricatorUIExample {
|
|||
|
||||
// PHUIButtonView
|
||||
|
||||
$colors = array(null,
|
||||
$colors = array(
|
||||
null,
|
||||
PHUIButtonView::GREEN,
|
||||
PHUIButtonView::GREY,
|
||||
PHUIButtonView::DISABLED,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
|
||||
abstract class PhabricatorSMSWorker
|
||||
extends PhabricatorWorker {
|
||||
|
||||
}
|
||||
extends PhabricatorWorker {}
|
||||
|
|
|
@ -4,8 +4,10 @@ final class LiskChunkTestCase extends PhabricatorTestCase {
|
|||
|
||||
public function testSQLChunking() {
|
||||
$fragments = array(
|
||||
'a', 'a',
|
||||
'b', 'b',
|
||||
'a',
|
||||
'a',
|
||||
'b',
|
||||
'b',
|
||||
'ccc',
|
||||
'dd',
|
||||
'e',
|
||||
|
@ -23,7 +25,14 @@ final class LiskChunkTestCase extends PhabricatorTestCase {
|
|||
|
||||
|
||||
$fragments = array(
|
||||
'a', 'a', 'a', 'XX', 'a', 'a', 'a', 'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'XX',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
);
|
||||
|
||||
$this->assertEqual(
|
||||
|
@ -38,7 +47,9 @@ final class LiskChunkTestCase extends PhabricatorTestCase {
|
|||
$fragments = array(
|
||||
'xxxxxxxxxx',
|
||||
'yyyyyyyyyy',
|
||||
'a', 'b', 'c',
|
||||
'a',
|
||||
'b',
|
||||
'c',
|
||||
'zzzzzzzzzz',
|
||||
);
|
||||
|
||||
|
|
|
@ -19,9 +19,23 @@ final class PhabricatorHashTestCase extends PhabricatorTestCase {
|
|||
|
||||
// Test that the encoding produces 6 bits of entropy per byte.
|
||||
$entropy = array(
|
||||
'dog', 'cat', 'rat', 'bat', 'dig', 'fig', 'cot',
|
||||
'cut', 'fog', 'rig', 'rug', 'dug', 'mat', 'pat',
|
||||
'eat', 'tar', 'pot',
|
||||
'dog',
|
||||
'cat',
|
||||
'rat',
|
||||
'bat',
|
||||
'dig',
|
||||
'fig',
|
||||
'cot',
|
||||
'cut',
|
||||
'fog',
|
||||
'rig',
|
||||
'rug',
|
||||
'dug',
|
||||
'mat',
|
||||
'pat',
|
||||
'eat',
|
||||
'tar',
|
||||
'pot',
|
||||
);
|
||||
|
||||
$seen = array();
|
||||
|
|
|
@ -290,7 +290,8 @@ final class AphrontDialogView extends AphrontView {
|
|||
}
|
||||
|
||||
if (!$this->renderAsForm) {
|
||||
$buttons = array(phabricator_form(
|
||||
$buttons = array(
|
||||
phabricator_form(
|
||||
$this->user,
|
||||
$form_attributes,
|
||||
array_merge($hidden_inputs, $buttons)),
|
||||
|
|
|
@ -55,7 +55,7 @@ final class PhabricatorUnitsTestCase extends PhabricatorTestCase {
|
|||
public function testDetailedDurationFormatting() {
|
||||
$expected_zero = 'now';
|
||||
|
||||
$tests = array (
|
||||
$tests = array(
|
||||
12095939 => '19 w, 6 d',
|
||||
-12095939 => '19 w, 6 d ago',
|
||||
|
||||
|
|
Loading…
Reference in a new issue