why not use something base of PEAR coding standards ?
public function foo($bar)
{
//
//return (bool) $bar;
//
}This can help: http://www.gnu.org/software/emacs/
http://pear.php.net/package/PHP_CodeSniffer/
and enable flymake php linting