]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use PHP type hinting in `ArcanistXHPASTLinter`.
authorJoshua Spence <josh@joshuaspence.com>
Sat, 10 May 2014 08:56:06 +0000 (01:56 -0700)
committerepriestley <git@epriestley.com>
Sat, 10 May 2014 08:56:06 +0000 (01:56 -0700)
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

src/lint/linter/ArcanistPhutilXHPASTLinter.php

index 00529efadd7348242984dbd73cc75417a3735b13..92b8ac6efd038b86da8e67c4a3b5a56576c8be97 100644 (file)
@@ -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');