Skip to content

Commit 8febaac

Browse files
committed
Changelog + tests for #2621
1 parent 413f71b commit 8febaac

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
2828
<notes>
2929
- Fixed bug #2615 : Constant visibility false positive on non-class constants
3030
- Fixed bug #2619 : PSR12.Files.FileHeader locks up when inline comment is the last content in a file
31+
- Fixed bug #2621 : PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument
32+
-- Thanks to Martins Sipenko for the patch
3133
</notes>
3234
<contents>
3335
<dir name="/">

src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,9 @@ $instance9 = new class (
7373
};
7474

7575
$instance10 = new class {};
76+
77+
$foo->bar(
78+
new class implements Bar {
79+
// ...
80+
},
81+
);

src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ $instance9 = new class (
7575
};
7676

7777
$instance10 = new class {};
78+
79+
$foo->bar(
80+
new class implements Bar {
81+
// ...
82+
},
83+
);

0 commit comments

Comments
 (0)