PHP_CodeSniffer のインストール

$ sudo pear install PHP_CodeSniffer
$ phpcs -i
The installed coding standards are MySource, PEAR, PHPCS, PSR1, PSR2, Squiz and Zend

flycheckの設定

(add-hook 'php-mode-hook
          (lambda ()
            (setq flycheck-phpcs-standard "PSR2")
:

indentの設定

(require 'php-mode) の前に書けばいい?

(setq php-mode-coding-style (quote psr2))
(require 'php-mode)

とりあえず上記の設定でflycheckの結果 = phpcs xxx.php --standard=psr2 の結果と合致するようになったし,インデントも綺麗にできるようになった.