相關連接:http://benmatselby.github.io/sublime-phpcs/php
1 : Tools -> Build System -> New Build System 2 : 粘貼如下代碼 { "cmd": ["php", "$file"], "file_regex": "php$", "selector": "source.php" } 3:文件保存爲php.sublime-build
附: 配置完成之後,打開一個php文件,按command + b運行當前代碼 git
方法1:Preferences -> Package Control -> Install Package -> Phpcs 方法2: $ cd ~/Library/Application\ Support/Sublime\ Text\ {N}/Packages/ $ git clone git://github.com/benmatselby/sublime-phpcs.git Phpcs 附:(這裏的phpcs只是一個sublime的交互插件)
brew install phpmd brew install php-cs-fixer
pear install PHP_CodeSniffer
「phpcs_php_path」 「phpcs_executable_path」 「phpmd_executable_path」 「php_cs_fixer_executable_path」
In order to get the path of the application:github
$ which php $ which phpcs $ which phpmd $ which php-cs-fixer $ which phpcbf