Skip to content

Commit e74e6c1

Browse files
authored
Merge pull request #1186 from PHPCSStandards/php-8.4/squiz-variablecomment-support-abstract-properties
PHP 8.4 | Squiz/VariableComment: add support for abstract properties
2 parents 401a322 + 9b4fcae commit e74e6c1

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function processMemberVar(File $phpcsFile, $stackPtr)
3636
T_STATIC => T_STATIC,
3737
T_READONLY => T_READONLY,
3838
T_FINAL => T_FINAL,
39+
T_ABSTRACT => T_ABSTRACT,
3940
T_WHITESPACE => T_WHITESPACE,
4041
T_STRING => T_STRING,
4142
T_NS_SEPARATOR => T_NS_SEPARATOR,

src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,10 @@ class AsymVisibility {
486486
*/
487487
private(set) protected int $hasDocblockC;
488488
}
489+
490+
abstract class PHP84AbstractProperties {
491+
/**
492+
* @var Type
493+
*/
494+
abstract Type $hasDocblock {get;}
495+
}

src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,10 @@ class AsymVisibility {
486486
*/
487487
private(set) protected int $hasDocblockC;
488488
}
489+
490+
abstract class PHP84AbstractProperties {
491+
/**
492+
* @var Type
493+
*/
494+
abstract Type $hasDocblock {get;}
495+
}

0 commit comments

Comments
 (0)