Skip to content

Commit 3946cf0

Browse files
committed
Keywords: fine-tune class::method() highlighting
1 parent a53d714 commit 3946cf0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/KeywordEnhancer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class KeywordEnhancer {
1010
'/\b(?<![`\/])[a-z][a-z\d_-]+(.stubs?)?\.(phpt?|c|h)(?![`.?])/', // run-tests.php / foo.stub.php foo.stubs.php / test-foo-bar.phpt,
1111
'/\b(?<!`)ext\/[a-z_]+\b(?![`\/])/', // ext-names
1212
'/\b(?<![`:])__[a-z][a-zA-Z\d_]+\(\)(?![`ws])/', // __debugInfo()
13-
'/\b(?<!`)[A-Za-z][A-Za-z\d]+::(?:__)?[a-z][A-Za-z\d_]+\(\)(?![`\/-])/', // Class::methods()
13+
'/\b(?<!`)[A-Za-z][A-Z\\\\a-z\d]+::(?:__)?[a-z][A-Za-z\d_]+\(\)(?![`\/-])/', // Class::methods()
1414
'/\b(?<!`)[A-Z][A-Za-z]+::(?:__)[a-z][A-Za-z\d_]+(?![`\/-])\b(?![)(])/', // Class::__magicMethods
1515
'/\b(?<!`)[A-Z][A-Za-z]+::[A-Z][A-Z_\d]+\b(?![`\/(])/', // Class::CONSTANTS
1616
'/\b(?<![`\\\\])[A-Z][A-Z\\\\a-z]+::[a-z][A-Za-z_\d]+\b(?![`\/(])/', // Class::constants

tests/KeywordEnhancerTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,22 @@ public static function dataCodifyText(): array {
188188
'Use curl_mime_*() functions if available',
189189
'Use `curl_mime_*()` functions if available',
190190
],
191+
[
192+
'Fix Uri\WhatWg\Url::withHost()',
193+
'Fix `Uri\WhatWg\Url::withHost()`',
194+
],
195+
[
196+
'Fix Uri\WhatWg\Url::withHost().',
197+
'Fix `Uri\WhatWg\Url::withHost()`.',
198+
],
199+
[
200+
'Fix Uri\WhatWg\Url::withHost',
201+
'Fix `Uri\WhatWg\Url::withHost`',
202+
],
203+
[
204+
'Fix Uri\WhatWg\Url::withHost.',
205+
'Fix `Uri\WhatWg\Url::withHost`.',
206+
],
191207
];
192208
}
193209

0 commit comments

Comments
 (0)