# Bug report PHPStan version: 1.7.1 `ReadOnlyPropertyAssignRule` is not aware of `__construct()` method on traits. ```php class UserId1 { public function __construct( public readonly int $id, // Valid ) { } } trait HasId { public function __construct( public readonly int $id, // Not Valid (Really?) ) { } } class UserId2 { use HasId; } ``` ### Code snippet that reproduces the problem https://phpstan.org/r/508524bf-d8ea-4e2d-86e2-9324ce575b1e ### Expected output No Errors