Page MenuHomeSealhub

ArcanistGlobalVariableXHPASTLinterRule.php
No OneTemporary

Authored By
Unknown
Size
650 B
Referenced Files
None
Subscribers
None

ArcanistGlobalVariableXHPASTLinterRule.php

<?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

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)

Event Timeline