Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22397699
ArcanistCastSpacingXHPASTLinterRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
792 B
Referenced Files
None
Subscribers
None
ArcanistCastSpacingXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistCastSpacingXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
66
;
public
function
getLintName
()
{
return
pht
(
'Cast Spacing'
);
}
public
function
getLintSeverity
()
{
return
ArcanistLintSeverity
::
SEVERITY_ADVICE
;
}
public
function
process
(
XHPASTNode
$root
)
{
$cast_expressions
=
$root
->
selectDescendantsOfType
(
'n_CAST_EXPRESSION'
);
foreach
(
$cast_expressions
as
$cast_expression
)
{
$cast
=
$cast_expression
->
getChildOfType
(
0
,
'n_CAST'
);
list
(
$before
,
$after
)
=
$cast
->
getSurroundingNonsemanticTokens
();
$after
=
head
(
$after
);
if
(
$after
)
{
$this
->
raiseLintAtToken
(
$after
,
pht
(
'A cast statement must not be followed by a space.'
),
''
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 27, 17:15 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1219608
Default Alt Text
ArcanistCastSpacingXHPASTLinterRule.php (792 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline