Skip to content

Commit a16e88f

Browse files
committed
Renamed new sniff property
1 parent cb41118 commit a16e88f

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,11 @@ class MultipleStatementAlignmentSniff implements Sniff
4848
public $maxPadding = 1000;
4949

5050
/**
51-
* Controls which side of the assignment token is used for alignment
52-
*
53-
* The default is to use the end of the assignemnt token:
54-
*
55-
* $test = 'Hello';
56-
* $test .= ' World';
57-
*
58-
* Setting to false reverses the alignment:
59-
*
60-
* $test = 'Hello';
61-
* $test .= 'World';
51+
* Controls which side of the assignment token is used for alignment.
6252
*
6353
* @var boolean
6454
*/
65-
public $alignAtEndOfAssignToken = true;
55+
public $alignAtEnd = true;
6656

6757

6858
/**
@@ -270,7 +260,7 @@ public function checkAlignment($phpcsFile, $stackPtr, $end=null)
270260
// padding length if they aligned with us.
271261
$varEnd = $tokens[($var + 1)]['column'];
272262
$assignLen = $tokens[$assign]['length'];
273-
if ($this->alignAtEndOfAssignToken !== true) {
263+
if ($this->alignAtEnd !== true) {
274264
$assignLen = 1;
275265
}
276266

src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ $foo .= ' World';
421421
$test = 1;
422422
$test <<= 6;
423423

424-
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEndOfAssignToken false
424+
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEnd false
425425

426426
// Valid
427427
$foo = 'Hello';
@@ -454,7 +454,7 @@ $varonetwothreefour = 'four';
454454
$one <<= 8;
455455
$onetwothree = 3;
456456

457-
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEndOfAssignToken true
457+
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEnd true
458458

459459
$one <<= 8;
460460
$onetwothree = 3;

src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ $foo .= ' World';
421421
$test = 1;
422422
$test <<= 6;
423423

424-
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEndOfAssignToken false
424+
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEnd false
425425

426426
// Valid
427427
$foo = 'Hello';
@@ -454,7 +454,7 @@ $varonetwothreefour = 'four';
454454
$one <<= 8;
455455
$onetwothree = 3;
456456

457-
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEndOfAssignToken true
457+
// phpcs:set Generic.Formatting.MultipleStatementAlignment alignAtEnd true
458458

459459
$one <<= 8;
460460
$onetwothree = 3;

0 commit comments

Comments
 (0)