Skip to content

Commit 33dd777

Browse files
authored
Merge pull request #641 from PHPCSStandards/feature/minor-docs-tweaks
ObjectDeclarations::getDeclaredProperties(): improve documentation
2 parents f836f00 + 9c2ca35 commit 33dd777

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

PHPCSUtils/Utils/ObjectDeclarations.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,13 @@ public static function getDeclaredEnumCases(File $phpcsFile, $stackPtr)
433433
/**
434434
* Retrieve all properties declared in an OO structure.
435435
*
436-
* Note: interfaces and enums cannot contain properties. This method does not take this into
437-
* account to allow sniffs to flag this kind of incorrect PHP code.
436+
* Notes:
437+
* - Properties declared via PHP 8.0+ contructor property promotion **will** be included
438+
* in the return value.
439+
* However, keep in mind that passing the stack pointer of such a property to the
440+
* {@see Variables::getMemberProperties()} method is not supported.
441+
* - Interfaces and enums cannot contain properties. This method does not take this into
442+
* account to allow sniffs to flag this kind of incorrect PHP code.
438443
*
439444
* @since 1.1.0
440445
*

0 commit comments

Comments
 (0)