Skip to content

Commit a6e9baa

Browse files
committed
Add T_ATTRIBUTE to Psalm stub
1 parent 0ed5233 commit a6e9baa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.dev-tools/psalm_stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace PhpCsFixer\Tokenizer {
1313
final class FCT
1414
{
15+
public const int T_ATTRIBUTE = \T_ATTRIBUTE;
1516
public const int T_PRIVATE_SET = \T_PRIVATE_SET;
1617
public const int T_PROTECTED_SET = \T_PROTECTED_SET;
1718
public const int T_PUBLIC_SET = \T_PUBLIC_SET;

src/Fixer/PhpdocNoIncorrectVarAnnotationFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private static function getIndexAfterPhpDoc(Tokens $tokens, int $index): ?int
9797
{
9898
$nextIndex = $tokens->getNextMeaningfulToken($index);
9999

100-
while ($nextIndex !== null && \defined('T_ATTRIBUTE') && $tokens[$nextIndex]->isGivenKind(\T_ATTRIBUTE)) {
100+
while ($nextIndex !== null && $tokens[$nextIndex]->isGivenKind(FCT::T_ATTRIBUTE)) {
101101
$nextIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ATTRIBUTE, $nextIndex);
102102
$nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
103103
}

0 commit comments

Comments
 (0)