Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2889007
ArcanistPHPShortTagXHPASTLinterRule.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
640 B
Referenced Files
None
Subscribers
None
ArcanistPHPShortTagXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistPHPShortTagXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
6
;
public
function
getLintName
(
)
{
return
pht
(
'Use of Short Tag `%s`'
,
'<?'
)
;
}
public
function
process
(
XHPASTNode
$root
)
{
$tokens
=
$root
->
getTokens
(
)
;
foreach
(
$tokens
as
$token
)
{
if
(
$token
->
getTypeName
(
)
===
'T_OPEN_TAG'
)
{
if
(
trim
(
$token
->
getValue
(
)
)
===
'<?'
)
{
$this
->
raiseLintAtToken
(
$token
,
pht
(
'Use the full form of the PHP open tag, `%s`.'
,
'<?php'
)
,
"<?php\n"
)
;
}
break
;
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 11:01 (5 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124051
Default Alt Text
ArcanistPHPShortTagXHPASTLinterRule.php (640 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment