Skip to content

Commit

Permalink
Changelog for #2694 + moved some tests around (ref #2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Nov 14, 2019
1 parent 15c3308 commit c27927c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #2678 : PSR12.Classes.AnonClassDeclaration incorrectly enforcing that closing brace be on a line by itself
- Fixed bug #2685 : File::getMethodParameters() setting typeHintEndToken for vars with no type hint
-- Thanks to Juliette Reinders Folmer for the patch
- Fixed bug #2694 : AbstractArraySniff produces invalid indices when using ternary operator
-- Thanks to Michał Bundyra for the patch
</notes>
<contents>
<dir name="/">
Expand Down
16 changes: 8 additions & 8 deletions src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ return [
]
];

// phpcs:set Generic.Arrays.ArrayIndent indent 2

$var = [
1 => 'one',
2 => 'two',
/* three */ 3 => 'three',
];

$array = [
'foo' => 'foo',
'bar' => $baz ?
Expand All @@ -66,3 +58,11 @@ $array = [
['one'] ??
['two'],
];

// phpcs:set Generic.Arrays.ArrayIndent indent 2

$var = [
1 => 'one',
2 => 'two',
/* three */ 3 => 'three',
];
20 changes: 10 additions & 10 deletions src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ return [
]
];

$array = [
'foo' => 'foo',
'bar' => $baz ?
['abc'] :
['def'],
'hey' => $baz ??
['one'] ??
['two'],
];

// phpcs:set Generic.Arrays.ArrayIndent indent 2

$var = [
1 => 'one',
2 => 'two',
/* three */ 3 => 'three',
];

$array = [
'foo' => 'foo',
'bar' => $baz ?
['abc'] :
['def'],
'hey' => $baz ??
['one'] ??
['two'],
];
9 changes: 3 additions & 6 deletions src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ public function getErrorList()
31 => 1,
33 => 1,
41 => 1,
55 => 1,
56 => 1,
57 => 1,
58 => 1,
61 => 1,
62 => 1,
65 => 1,
66 => 1,
67 => 1,
68 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit c27927c

Please sign in to comment.