diff --git a/src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php --- a/src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php @@ -15,36 +15,12 @@ public function process(XHPASTNode $root) { $nodes = $root->selectDescendantsOfTypes(array( - 'n_ARRAY_LITERAL', 'n_FUNCTION_CALL', 'n_METHOD_CALL', - 'n_LIST', )); foreach ($nodes as $node) { - switch ($node->getTypeName()) { - case 'n_ARRAY_LITERAL': - if (head($node->getTokens())->getTypeName() == '[') { - // Short array syntax. - continue 2; - } - - $params = $node->getChildOfType(0, 'n_ARRAY_VALUE_LIST'); - break; - - case 'n_FUNCTION_CALL': - case 'n_METHOD_CALL': - $params = $node->getChildOfType(1, 'n_CALL_PARAMETER_LIST'); - break; - - case 'n_LIST': - $params = $node->getChildOfType(0, 'n_ASSIGNMENT_LIST'); - break; - - default: - throw new Exception( - pht("Unexpected node of type '%s'!", $node->getTypeName())); - } + $params = $node->getChildOfType(1, 'n_CALL_PARAMETER_LIST'); $tokens = $params->getTokens(); $first = head($tokens); diff --git a/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php --- a/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php @@ -34,10 +34,6 @@ $nonsem_o = $token_o->getNonsemanticTokensAfter(); $nonsem_c = $token_c->getNonsemanticTokensBefore(); - if (!$nonsem_o) { - continue; - } - $raise = array(); $string_o = implode('', mpull($nonsem_o, 'getValue')); diff --git a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test b/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test deleted file mode 100644 --- a/src/lint/linter/xhpast/rules/__tests__/call-parentheses/array.lint-test +++ /dev/null @@ -1,15 +0,0 @@ -