From: Joshua Spence Date: Sat, 10 May 2014 08:56:06 +0000 (-0700) Subject: Use PHP type hinting in `ArcanistXHPASTLinter`. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=20a05595226cda7e0a5080314504f9a223f9556a;p=arcanist.git Use PHP type hinting in `ArcanistXHPASTLinter`. Summary: Explicitly specify the types of the function parameters. This change is basically the same as D8388. Test Plan: `arc unit`. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9040 --- diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php index 00529efa..92b8ac6e 100644 --- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php +++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php @@ -107,7 +107,7 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { } - private function lintUnsafeDynamicString($root) { + private function lintUnsafeDynamicString(XHPASTNode $root) { $safe = $this->dynamicStringFunctions + array( 'pht' => 0, @@ -175,7 +175,7 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { } - private function lintArrayCombine($root) { + private function lintArrayCombine(XHPASTNode $root) { $function_calls = $root->selectDescendantsOfType('n_FUNCTION_CALL'); foreach ($function_calls as $call) { $name = $call->getChildByIndex(0)->getConcreteString(); @@ -200,7 +200,7 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { } } - private function lintDeprecatedFunctions($root) { + private function lintDeprecatedFunctions(XHPASTNode $root) { $map = $this->deprecatedFunctions; $function_calls = $root->selectDescendantsOfType('n_FUNCTION_CALL');