Skip to content

Commit 991fb88

Browse files
committed
Merge branch 2.1.x into 2.2.x
2 parents 88efcbe + 508cec1 commit 991fb88

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/PHPStan/Rules/Operators/data/bug-3585.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ function baz(): void
2222
{
2323
$this = 1; // PHP forbids this too
2424
}
25+
26+
class Test {
27+
public function foobar():void {
28+
$this ??= 123;
29+
}
30+
}

tests/PHPStan/Rules/Variables/InvalidVariableAssignRuleTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public function testBug3585(): void
4343
'Cannot re-assign $this.',
4444
23,
4545
],
46+
[
47+
'Cannot re-assign $this.',
48+
28,
49+
],
4650
]);
4751
}
4852

0 commit comments

Comments
 (0)