File tree Expand file tree Collapse file tree 4 files changed +23
-24
lines changed
src/Standards/Generic/Tests/Arrays Expand file tree Collapse file tree 4 files changed +23
-24
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
54
54
- Fixed bug #2678 : PSR12.Classes.AnonClassDeclaration incorrectly enforcing that closing brace be on a line by itself
55
55
- Fixed bug #2685 : File::getMethodParameters() setting typeHintEndToken for vars with no type hint
56
56
-- Thanks to Juliette Reinders Folmer for the patch
57
+ - Fixed bug #2694 : AbstractArraySniff produces invalid indices when using ternary operator
58
+ -- Thanks to Michał Bundyra for the patch
57
59
</notes>
58
60
<contents>
59
61
<dir name="/">
Original file line number Diff line number Diff line change @@ -49,14 +49,6 @@ return [
49
49
]
50
50
];
51
51
52
- // phpcs:set Generic.Arrays.ArrayIndent indent 2
53
-
54
- $ var = [
55
- 1 => 'one ' ,
56
- 2 => 'two ' ,
57
- /* three */ 3 => 'three ' ,
58
- ];
59
-
60
52
$ array = [
61
53
'foo ' => 'foo ' ,
62
54
'bar ' => $ baz ?
@@ -66,3 +58,11 @@ $array = [
66
58
['one ' ] ??
67
59
['two ' ],
68
60
];
61
+
62
+ // phpcs:set Generic.Arrays.ArrayIndent indent 2
63
+
64
+ $ var = [
65
+ 1 => 'one ' ,
66
+ 2 => 'two ' ,
67
+ /* three */ 3 => 'three ' ,
68
+ ];
Original file line number Diff line number Diff line change @@ -50,20 +50,20 @@ return [
50
50
]
51
51
];
52
52
53
+ $array = [
54
+ 'foo' => 'foo',
55
+ 'bar' => $baz ?
56
+ ['abc'] :
57
+ ['def'],
58
+ 'hey' => $baz ??
59
+ ['one'] ??
60
+ ['two'],
61
+ ];
62
+
53
63
// phpcs:set Generic.Arrays.ArrayIndent indent 2
54
64
55
65
$var = [
56
66
1 => 'one',
57
67
2 => 'two',
58
68
/* three */ 3 => 'three',
59
69
];
60
-
61
- $array = [
62
- 'foo' => 'foo',
63
- 'bar' => $baz ?
64
- ['abc'] :
65
- ['def'],
66
- 'hey' => $baz ??
67
- ['one'] ??
68
- ['two'],
69
- ];
Original file line number Diff line number Diff line change @@ -33,13 +33,10 @@ public function getErrorList()
33
33
31 => 1 ,
34
34
33 => 1 ,
35
35
41 => 1 ,
36
- 55 => 1 ,
37
- 56 => 1 ,
38
- 57 => 1 ,
39
- 58 => 1 ,
40
- 61 => 1 ,
41
- 62 => 1 ,
42
36
65 => 1 ,
37
+ 66 => 1 ,
38
+ 67 => 1 ,
39
+ 68 => 1 ,
43
40
];
44
41
45
42
}//end getErrorList()
You can’t perform that action at this time.
0 commit comments