Page MenuHomePhabricator

Add a linter rule for parentheses being used with PHP language constructs
Closed, ResolvedPublic

Description

PHP has various language constructs such as echo and require which can be called with or without parentheses. For example, echo "Foo"; and echo("Foo"); are equivalent. We should add a linter rule to ArcanistXHPASTLinter which favors the parenthesis being omitted.

Event Timeline

joshuaspence claimed this task.
joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence triaged this task as Wishlist priority.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Arcanist.
joshuaspence added a subscriber: joshuaspence.

My favorite is exit:

$ php -r 'echo strlen("quack" + exit);'