Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22423460
ArcanistPHPEchoTagXHPASTLinterRule.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
507 B
Referenced Files
None
Subscribers
None
ArcanistPHPEchoTagXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistPHPEchoTagXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
7
;
public
function
getLintName
()
{
return
pht
(
'Use of Echo Tag "%s"'
,
'<?='
);
}
public
function
process
(
XHPASTNode
$root
)
{
$tokens
=
$root
->
getTokens
();
foreach
(
$tokens
as
$token
)
{
if
(
$token
->
getTypeName
()
===
'T_OPEN_TAG_WITH_ECHO'
)
{
$this
->
raiseLintAtToken
(
$token
,
pht
(
'Avoid the PHP echo short form, "%s".'
,
'<?='
));
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 28, 03:34 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1223080
Default Alt Text
ArcanistPHPEchoTagXHPASTLinterRule.php (507 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline