Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22419789
ArcanistGlobalVariableXHPASTLinterRule.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
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
Sat, Nov 28, 02:24 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1208634
Default Alt Text
ArcanistGlobalVariableXHPASTLinterRule.php (650 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline