Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118284780
PhabricatorSymbolNameLinter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jun 19, 01:26
Size
790 B
Mime Type
text/x-php
Expires
Sat, Jun 21, 01:26 (2 d)
Engine
blob
Format
Raw Data
Handle
26847127
Attached To
rPH Phabricator
PhabricatorSymbolNameLinter.php
View Options
<?php
final
class
PhabricatorSymbolNameLinter
extends
ArcanistXHPASTLintNamingHook
{
public
function
lintSymbolName
(
$type
,
$name
,
$default
)
{
$matches
=
null
;
if
(
$type
==
'class'
&&
preg_match
(
'/^ConduitAPI_(.*)_Method$/'
,
$name
,
$matches
))
{
if
(
preg_match
(
'/^[a-z]+(_[a-z]+)?$/'
,
$matches
[
1
]))
{
// These are permitted since Conduit does reflectioney stuff to figure
// out the method name from the class name.
return
null
;
}
else
{
return
'Conduit method implementations should contain lowercase '
.
'letters only, with an underscore separating group and method '
.
'names for implementations, e.g. '
.
'"ConduitAPI_thing_info_Method".'
;
}
}
return
$default
;
}
}
Event Timeline
Log In to Comment