@@ -524,7 +524,7 @@ public static function getMethodParameters(File $phpcsFile, $stackPtr)
524524 *
525525 * Changelog for the PHPCS native function:
526526 * - Introduced in PHPCS 0.0.5.
527- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
527+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
528528 *
529529 * @see \PHP_CodeSniffer\Files\File::getMethodProperties() Original source.
530530 * @see \PHPCSUtils\Utils\FunctionDeclarations::getProperties() PHPCSUtils native improved version.
@@ -559,6 +559,7 @@ public static function getMethodProperties(File $phpcsFile, $stackPtr)
559559 * 'is_static' => boolean, // TRUE if the static keyword was found.
560560 * 'is_readonly' => boolean, // TRUE if the readonly keyword was found.
561561 * 'is_final' => boolean, // TRUE if the final keyword was found.
562+ * 'is_abstract' => boolean, // TRUE if the abstract keyword was found.
562563 * 'type' => string, // The type of the var (empty if no type specified).
563564 * 'type_token' => integer|false, // The stack pointer to the start of the type
564565 * // or FALSE if there is no type.
@@ -573,13 +574,16 @@ public static function getMethodProperties(File $phpcsFile, $stackPtr)
573574 *
574575 * Changelog for the PHPCS native function:
575576 * - Introduced in PHPCS 0.0.5.
577+ * - PHPCS 3.13.3: support for PHP 8.4 abstract properties.
576578 * - PHPCS 4.0: properties in interfaces (PHP 8.4+) are accepted.
577579 * - PHPCS 4.0: will no longer throw a parse error warning.
578580 *
579581 * @see \PHP_CodeSniffer\Files\File::getMemberProperties() Original source.
580582 * @see \PHPCSUtils\Utils\Variables::getMemberProperties() PHPCSUtils native improved version.
581583 *
582584 * @since 1.0.0
585+ * @since 1.1.0 Sync with PHPCS 4.0.0, remove parse error warning and support PHP 8.4 properties in interfaces. PHPCS(new)#991
586+ * @since 1.1.2 Sync with PHPCS 3.13.3, support for abstract properties. PHPCS(new)#xxx
583587 *
584588 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
585589 * @param int $stackPtr The position in the stack of the `T_VARIABLE` token to
@@ -626,6 +630,7 @@ public static function getMemberProperties(File $phpcsFile, $stackPtr)
626630 T_VAR => T_VAR ,
627631 T_READONLY => T_READONLY ,
628632 T_FINAL => T_FINAL ,
633+ T_ABSTRACT => T_ABSTRACT ,
629634 ];
630635
631636 $ valid += Tokens::$ scopeModifiers ;
@@ -637,6 +642,7 @@ public static function getMemberProperties(File $phpcsFile, $stackPtr)
637642 $ isStatic = false ;
638643 $ isReadonly = false ;
639644 $ isFinal = false ;
645+ $ isAbstract = false ;
640646
641647 $ startOfStatement = $ phpcsFile ->findPrevious (
642648 [
@@ -684,6 +690,9 @@ public static function getMemberProperties(File $phpcsFile, $stackPtr)
684690 case T_FINAL :
685691 $ isFinal = true ;
686692 break ;
693+ case T_ABSTRACT :
694+ $ isAbstract = true ;
695+ break ;
687696 }
688697 }
689698
@@ -728,6 +737,7 @@ public static function getMemberProperties(File $phpcsFile, $stackPtr)
728737 'is_static ' => $ isStatic ,
729738 'is_readonly ' => $ isReadonly ,
730739 'is_final ' => $ isFinal ,
740+ 'is_abstract ' => $ isAbstract ,
731741 'type ' => $ type ,
732742 'type_token ' => $ typeToken ,
733743 'type_end_token ' => $ typeEndToken ,
@@ -751,7 +761,7 @@ public static function getMemberProperties(File $phpcsFile, $stackPtr)
751761 *
752762 * Changelog for the PHPCS native function:
753763 * - Introduced in PHPCS 1.3.0.
754- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
764+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
755765 *
756766 * @see \PHP_CodeSniffer\Files\File::getClassProperties() Original source.
757767 * @see \PHPCSUtils\Utils\ObjectDeclarations::getClassProperties() PHPCSUtils native improved version.
@@ -779,7 +789,7 @@ public static function getClassProperties(File $phpcsFile, $stackPtr)
779789 *
780790 * Changelog for the PHPCS native function:
781791 * - Introduced in PHPCS 0.0.5.
782- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
792+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
783793 *
784794 * @see \PHP_CodeSniffer\Files\File::isReference() Original source.
785795 * @see \PHPCSUtils\Utils\Operators::isReference() PHPCSUtils native improved version.
@@ -805,7 +815,7 @@ public static function isReference(File $phpcsFile, $stackPtr)
805815 *
806816 * Changelog for the PHPCS native function:
807817 * - Introduced in PHPCS 0.0.5.
808- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
818+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
809819 *
810820 * @see \PHP_CodeSniffer\Files\File::getTokensAsString() Original source.
811821 * @see \PHPCSUtils\Utils\GetTokensAsString Related set of functions.
@@ -834,7 +844,7 @@ public static function getTokensAsString(File $phpcsFile, $start, $length, $orig
834844 *
835845 * Changelog for the PHPCS native function:
836846 * - Introduced in PHPCS 2.1.0.
837- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
847+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
838848 *
839849 * @see \PHP_CodeSniffer\Files\File::findStartOfStatement() Original source.
840850 *
@@ -858,7 +868,7 @@ public static function findStartOfStatement(File $phpcsFile, $start, $ignore = n
858868 *
859869 * Changelog for the PHPCS native function:
860870 * - Introduced in PHPCS 2.1.0.
861- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
871+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
862872 *
863873 * @see \PHP_CodeSniffer\Files\File::findEndOfStatement() Original source.
864874 *
@@ -882,7 +892,7 @@ public static function findEndOfStatement(File $phpcsFile, $start, $ignore = nul
882892 *
883893 * Changelog for the PHPCS native function:
884894 * - Introduced in PHPCS 0.0.5.
885- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
895+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
886896 *
887897 * @see \PHP_CodeSniffer\Files\File::hasCondition() Original source.
888898 * @see \PHPCSUtils\Utils\Conditions::hasCondition() PHPCSUtils native alternative.
@@ -907,7 +917,7 @@ public static function hasCondition(File $phpcsFile, $stackPtr, $types)
907917 *
908918 * Changelog for the PHPCS native function:
909919 * - Introduced in PHPCS 1.3.0.
910- * - The upstream method has received no significant updates since PHPCS 3.13.0 .
920+ * - The upstream method has received no significant updates since PHPCS 3.13.3 .
911921 *
912922 * @see \PHP_CodeSniffer\Files\File::getCondition() Original source.
913923 * @see \PHPCSUtils\Utils\Conditions::getCondition() More versatile alternative.
0 commit comments