Skip to content

Commit

Permalink
Squiz/ArrayDeclaration: test for CloseBraceNotAligned
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Aug 29, 2023
1 parent 2d51a63 commit a99c2d5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,3 +529,9 @@ $x = array(
'bar',
'baz' => 'bar', // KeySpecified (based on first entry).
);

$x =
array(
'a',
'b',
);
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,9 @@ $x = array(
'bar',
'baz' => 'bar', // KeySpecified (based on first entry).
);

$x =
array(
'a',
'b',
);
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,9 @@ $x = [
'bar',
'baz' => 'bar', // KeySpecified (based on first entry).
];

$x =
[
'a',
'b',
];
Original file line number Diff line number Diff line change
Expand Up @@ -552,3 +552,9 @@ $x = [
'bar',
'baz' => 'bar', // KeySpecified (based on first entry).
];

$x =
[
'a',
'b',
];
2 changes: 2 additions & 0 deletions src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public function getErrorList($testFile='')
516 => 1,
523 => 1,
530 => 1,
537 => 1,
];
case 'ArrayDeclarationUnitTest.2.inc':
return [
Expand Down Expand Up @@ -218,6 +219,7 @@ public function getErrorList($testFile='')
505 => 1,
512 => 1,
519 => 1,
526 => 1,
];
default:
return [];
Expand Down

0 comments on commit a99c2d5

Please sign in to comment.