Skip to content

Commit a3e883d

Browse files
authored
Merge pull request #949 from PHPCSStandards/feature/squiz-variablecomment-support-php84-final-props
PHP 8.4 | Squiz/VariableComment: add support for final properties
2 parents 2b63770 + 39c7089 commit a3e883d

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

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

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

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

+7
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,10 @@ class DNFTypes
462462
*/
463463
private (\Iterator&namespace\Countable)|false|null $variableName;
464464
}
465+
466+
class PHP84FinalProperties {
467+
/**
468+
* @var integer
469+
*/
470+
final int $hasDocblock;
471+
}

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

+7
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,10 @@ class DNFTypes
462462
*/
463463
private (\Iterator&namespace\Countable)|false|null $variableName;
464464
}
465+
466+
class PHP84FinalProperties {
467+
/**
468+
* @var integer
469+
*/
470+
final int $hasDocblock;
471+
}

0 commit comments

Comments
 (0)