Differential D19716 Diff 47131 src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
| Show All 11 Lines | final class ArcanistPHPCompatibilityXHPASTLinterRule | ||||
| public function process(XHPASTNode $root) { | public function process(XHPASTNode $root) { | ||||
| static $compat_info; | static $compat_info; | ||||
| if (!$this->version) { | if (!$this->version) { | ||||
| return; | return; | ||||
| } | } | ||||
| if ($compat_info === null) { | if ($compat_info === null) { | ||||
| $target = phutil_get_library_root('phutil'). | $arcanist_root = dirname(phutil_get_library_root('arcanist')); | ||||
| '/../resources/php_compat_info.json'; | $target = $arcanist_root.'/resources/php/php_compat_info.json'; | ||||
| $compat_info = phutil_json_decode(Filesystem::readFile($target)); | $compat_info = phutil_json_decode(Filesystem::readFile($target)); | ||||
| } | } | ||||
| // Create a whitelist for symbols which are being used conditionally. | // Create a whitelist for symbols which are being used conditionally. | ||||
| $whitelist = array( | $whitelist = array( | ||||
| 'class' => array(), | 'class' => array(), | ||||
| 'function' => array(), | 'function' => array(), | ||||
| ); | ); | ||||
| ▲ Show 20 Lines • Show All 441 Lines • Show Last 20 Lines | |||||