Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/PHPStan/Rules/Properties/PropertyInClassRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ public function testPhp84AndReadonlyHookedProperties(): void
'Hooked properties cannot be readonly.',
19,
],
[
'Hooked properties cannot be readonly.',
24,
],
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ abstract class HiWorld
{
public abstract readonly string $firstName { get { return 'jake'; } set; }
}

readonly class GoodMorningWorld
{
public string $firstName {
get => $this->firstName;
set => $this->firstName;
}
}
Loading