Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22418745
ArcanistPHPCloseTagXHPASTLinterRule.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
565 B
Referenced Files
None
Subscribers
None
ArcanistPHPCloseTagXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistPHPCloseTagXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
8
;
public
function
getLintName
()
{
return
pht
(
'Use of Close Tag `%s`'
,
'?>'
);
}
public
function
process
(
XHPASTNode
$root
)
{
$inline_html
=
$root
->
selectDescendantsOfType
(
'n_INLINE_HTML'
);
if
(
$inline_html
)
{
return
;
}
foreach
(
$root
->
selectTokensOfType
(
'T_CLOSE_TAG'
)
as
$token
)
{
$this
->
raiseLintAtToken
(
$token
,
pht
(
'Do not use the PHP closing tag, `%s`.'
,
'?>'
));
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 28, 02:15 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1212615
Default Alt Text
ArcanistPHPCloseTagXHPASTLinterRule.php (565 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline