Skip to content

Commit f1f9c90

Browse files
committed
Add test case for constructor property promotion with namespace type
1 parent 40d4800 commit f1f9c90

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/VariableAnalysisSniff/fixtures/ClassWithMembersFixture.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,13 @@ public function getMessage(): string {
222222
return $this->message;
223223
}
224224
}
225+
226+
class ClassWithNamespacedConstructorPropertyPromotion
227+
{
228+
public function __construct(
229+
public \App\Models\User $user,
230+
public readonly \App\Models\Blog $blog,
231+
private \App\Models\Game $game,
232+
protected ?\App\Models\Flag $flag,
233+
) {}
234+
}

0 commit comments

Comments
 (0)