Skip to content

Commit 7ff9171

Browse files
committed
Keywords: improve class method detection to allow numbers in the class name
1 parent ffa8582 commit 7ff9171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KeywordEnhancer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class KeywordEnhancer {
88
'/\b(?<!`)(?:zend|php|_php)_[a-z_*]+\b(?![`.(=])\*?/i', // zend_foo_bar
99
'/\b(?<![`\/])[a-z][a-z\d_-]+(.stubs?)?\.(phpt?|c|h)(?![`.?])/', // run-tests.php / foo.stub.php foo.stubs.php / test-foo-bar.phpt,
1010
'/\b(?<!`)ext\/[a-z_]+\b(?![`\/])/', // ext-names
11-
'/\b(?<!`)[A-Za-z][A-Za-z]+::(?:__)?[a-z][A-Za-z\d_]+\(\)(?![`\/-])/', // Class::methods()
11+
'/\b(?<!`)[A-Za-z][A-Za-z\d]+::(?:__)?[a-z][A-Za-z\d_]+\(\)(?![`\/-])/', // Class::methods()
1212
'/\b(?<!`)[A-Z][A-Za-z]+::(?:__)[a-z][A-Za-z\d_]+(?![`\/-])\b(?![)(])/', // Class::__magicMethods
1313
'/\b(?<!`)[A-Z][A-Za-z]+::[A-Z_]+\b(?![`\/(])/', // Class::CONSTANTS
1414
'/\b(?<![`\\\\])[A-Z][A-Z\\\\a-z]+::[a-z][A-Za-z_\d]+\b(?![`\/(])/', // Class::constants

0 commit comments

Comments
 (0)