Are there any existing tools for applying an arbitrary lint to PHP code? I know about the command line flag (-l) and pecl extension that will check an input file for valid syntax. What I want is a tool that will let me reject something if it has a certain valid but undesirable syntax.
For example, the lint might reject this
if ($foo) bar();
but accept this
if ($foo) {
bar();
}
Both are "valid code", but the first break my personal coding conventions.