#Inspection Tools with homebrew-php#
##Prerequisites##
- Homebrew is installed
##Step 1: Installing homebrew-php##
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install PHP53
(or other version of your choice)
##Step 2: Installing PHP Code Sniffer##
brew install php-code-sniffer
brew install phpcs
###Integration with IntelliJ IDEA or PhpStorm###
- Navigate to Preferences > PHP > Code Sniffer
- Set path to output of
which phpcs
and hit 'validate' - Navigate to Preferences > Inspections > PHP > PHP Code Sniffer validation and tick to enable
- Refresh 'Coding Standards' dropdown and select your preferred options
##Step 3: Installing PHP Mess Detector##
brew install phpmd
###Integration with IntelliJ IDEA or PhpStorm###
- Navigate to Preferences > PHP > Mess Detector
- Set path to output of
which phpmd
and hit 'validate' - Navigate to Preferences > Inspections > PHP and tick to enable