Skip to content

Commit a53d714

Browse files
committed
Update keyword-highlighting rules
1 parent 4354805 commit a53d714

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
@@ -15,7 +15,7 @@ class KeywordEnhancer {
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
1717
'/\b(?<!`-)[a-z]+_[a-z]+(?:_[a-z_]+)?\(\)(?![`\/])/', // Functions with underscores and ()
18-
'/\b(?<![`>])[a-z_][a-z][a-z\d_]+\(\)(?![`.>\/-])/', // Functions with underscores and ()
18+
'/\b(?<![`>])[a-z_][a-z][a-z\d_]+\*?\(\)(?![`.>\/-])/', // Functions with underscores and ()
1919
'/\b(?<!`)(?:ldap|ftp|array|mb|stream|open|hash|xml|proc|pcntl|curl|intl|date|grapheme|socket|stream)_[a-z_]+\d?\b(?![`\/])/', // Functions with underscores and no ()
2020
'/\b(?<!`)(xleak|xfail|skipif)\b(?![`\/])/i', // xleak
2121
'/(?<![`>()-])--[a-z][a-z-]+(?![`])/i', // --flags, --flags-and-more

tests/KeywordEnhancerTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,22 @@ public static function dataCodifyText(): array {
172172
'Deprecate SplFixedArray::__wakeup()',
173173
'Deprecate `SplFixedArray::__wakeup()`',
174174
],
175+
[
176+
'Fix tests/output/bug74815.phpt generating errors.log',
177+
'Fix `tests/output/bug74815.phpt` generating errors.log',
178+
],
179+
[
180+
'Fix ext/soap/tests/bug69137.phpt',
181+
'Fix `ext/soap/tests/bug69137.phpt`',
182+
],
183+
[
184+
'Use curl_mime_*() functions if available',
185+
'Use `curl_mime_*()` functions if available',
186+
],
187+
[
188+
'Use curl_mime_*() functions if available',
189+
'Use `curl_mime_*()` functions if available',
190+
],
175191
];
176192
}
177193

0 commit comments

Comments
 (0)