Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15406267
D10539.id25320.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10539.id25320.diff
View Options
diff --git a/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php b/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php
--- a/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php
+++ b/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php
@@ -113,9 +113,29 @@
* @task util
*/
public static function stripPHPFunction($symbol) {
- // Allow initial "__" for magic methods like __construct; we could also
- // enumerate these explicitly.
- return preg_replace('/^__/', '', $symbol);
+ switch ($symbol) {
+ case '__assign_concat':
+ case '__call':
+ case '__callStatic':
+ case '__clone':
+ case '__concat':
+ case '__construct':
+ case '__debugInfo':
+ case '__destruct':
+ case '__get':
+ case '__invoke':
+ case '__isset':
+ case '__set':
+ case '__set_state':
+ case '__sleep':
+ case '__toString':
+ case '__unset':
+ case '__wakeup':
+ return preg_replace('/^__/', '', $symbol);
+
+ default:
+ return $symbol;
+ }
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 12:19 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7710277
Default Alt Text
D10539.id25320.diff (1 KB)
Attached To
Mode
D10539: Explicitly enumerate PHP magic methods
Attached
Detach File
Event Timeline
Log In to Comment