Skip to content

Commit 26a509a

Browse files
committed
Fixed PropertyHelper::findTypeHint()
1 parent da11950 commit 26a509a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SlevomatCodingStandard/Helpers/PropertyHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use const T_PROTECTED;
1616
use const T_PUBLIC;
1717
use const T_SEMICOLON;
18+
use const T_STATIC;
1819
use const T_VAR;
1920

2021
class PropertyHelper
@@ -31,7 +32,7 @@ public static function findTypeHint(File $phpcsFile, int $propertyPointer): ?Pro
3132
{
3233
$tokens = $phpcsFile->getTokens();
3334

34-
$propertyStartPointer = TokenHelper::findPrevious($phpcsFile, [T_PRIVATE, T_PROTECTED, T_PUBLIC, T_VAR], $propertyPointer - 1);
35+
$propertyStartPointer = TokenHelper::findPrevious($phpcsFile, [T_PRIVATE, T_PROTECTED, T_PUBLIC, T_VAR, T_STATIC], $propertyPointer - 1);
3536

3637
$typeHintEndPointer = TokenHelper::findPrevious($phpcsFile, TokenHelper::$typeHintTokenCodes, $propertyPointer - 1, $propertyStartPointer);
3738
if ($typeHintEndPointer === null) {

0 commit comments

Comments
 (0)