diff --git a/src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php
--- a/src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php
+++ b/src/lint/linter/xhpast/rules/ArcanistFunctionCallShouldBeTypeCastXHPASTLinterRule.php
@@ -37,7 +37,13 @@
       // one parameter.
       if (count($parameters->getChildren()) == 1) {
         $parameter   = $parameters->getChildByIndex(0);
-        $replacement = '('.$cast_name.')'.$parameter->getConcreteString();
+        $replacement = '('.$cast_name.')';
+
+        if ($parameter->getTypeName() == 'n_BINARY_EXPRESSION') {
+          $replacement .= '('.$parameter->getConcreteString().')';
+        } else {
+          $replacement .= $parameter->getConcreteString();
+        }
       }
 
       if (strtolower($function_name) == 'intval') {
diff --git a/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test
new file mode 100644
--- /dev/null
+++ b/src/lint/linter/xhpast/rules/__tests__/function-call-should-be-type-cast/binary-expression.lint-test
@@ -0,0 +1,7 @@
+<?php
+intval($x / 2) + 1;
+~~~~~~~~~~
+advice:2:1
+~~~~~~~~~~
+<?php
+(int)($x / 2) + 1;