Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22395462
ArcanistPHPShortTagXHPASTLinterRule.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
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
Fri, Nov 27, 16:26 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1218945
Default Alt Text
ArcanistPHPShortTagXHPASTLinterRule.php (640 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline