Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2889964
ArcanistGlobalVariableXHPASTLinterRule.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
650 B
Referenced Files
None
Subscribers
None
ArcanistGlobalVariableXHPASTLinterRule.php
View Options
<?php
final
class
ArcanistGlobalVariableXHPASTLinterRule
extends
ArcanistXHPASTLinterRule
{
const
ID
=
79
;
public
function
getLintName
(
)
{
return
pht
(
'Global Variables'
)
;
}
public
function
getLintSeverity
(
)
{
return
ArcanistLintSeverity
::
SEVERITY_WARNING
;
}
public
function
process
(
XHPASTNode
$root
)
{
$nodes
=
$root
->
selectDescendantsOfType
(
'n_GLOBAL_DECLARATION_LIST'
)
;
foreach
(
$nodes
as
$node
)
{
$this
->
raiseLintAtNode
(
$node
,
pht
(
'Limit the use of global variables. Global variables are '
.
'generally a bad idea and should be avoided when possible.'
)
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 12:53 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120448
Default Alt Text
ArcanistGlobalVariableXHPASTLinterRule.php (650 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment