Skip to content

Commit 7f3030b

Browse files
authored
Merge pull request #239 from magento-commerce/imported-sandipklevu-magento-coding-standard-447
[Imported] Allow readonly between phpdoc and property name
2 parents a0b6fc9 + 889b4d2 commit 7f3030b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class ClassPropertyPHPDocFormattingSniff extends AbstractVariableSniff
3232
T_NULLABLE,
3333
T_BITWISE_AND,
3434
T_TYPE_UNION,
35+
T_READONLY,
3536
];
3637

3738
/**

Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.inc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,14 @@ class correctlyFormattedClassMemberDocBlock
200200
* @deprecated This property will be removed in version 1.0.0 without replacement
201201
*/
202202
protected string $deprecatedWithKeyword;
203+
204+
/**
205+
* @var string
206+
*/
207+
protected readonly string $readOnlyString;
208+
209+
/**
210+
* @var int
211+
*/
212+
protected readonly int $readOnlyInteger;
203213
}

0 commit comments

Comments
 (0)