
Rule phpdoc_readonly_class_comment_to_keyword
ΒΆ
Converts readonly comment on classes to the readonly keyword.
WarningΒΆ
Using this rule is riskyΒΆ
If classes marked with @readonly
annotation were extended anyway, applying
this fixer may break the inheritance for their child classes.
ExamplesΒΆ
Example #1ΒΆ
--- Original
+++ New
<?php
- /** @readonly */
- class C {
+
+ readonly class C {
}
Source classΒΆ
PhpCsFixer\Fixer\ClassNotation\PhpdocReadonlyClassCommentToKeywordFixer