Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892183
ArcanistPHPEchoTagXHPASTLinterRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
532 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
Sun, Jan 19, 16:22 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120503
Default Alt Text
ArcanistPHPEchoTagXHPASTLinterRule.php (532 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment