Skip to content

Commit 055d6f4

Browse files
authored
Latest composer and better variable pattern
1 parent 61f1cb9 commit 055d6f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ notifications:
1313
email: false
1414

1515
before_install:
16-
- composer self-update 1.6.5
16+
- composer self-update
1717
- composer global show hirak/prestissimo -q || composer global require hirak/prestissimo
1818

1919
install: composer install

src/Fixer/PhpdocVarAnnotationCorrectOrderFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function fix(\SplFileInfo $file, Tokens $tokens): void
4444
}
4545

4646
$newContent = \preg_replace(
47-
'/(@var\s*)(\$\S+)(\s+)([^\$](?:[^<\s]|<[^>]*>)*)(\s|\*)/i',
47+
'/(@var\s*)(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(\s+)([^\$](?:[^<\s]|<[^>]*>)*)(\s|\*)/i',
4848
'$1$4$3$2$5',
4949
$token->getContent()
5050
);

0 commit comments

Comments
 (0)