The documentation for PHP_CodeSniffer is available on the Github wiki.
Presuming you used homebrew to install your php the main thing is getting the DDC ruleset installed
brew install homebrew/php/php-code-sniffer
cd /usr/local/Cellar/php-code-sniffer/<version>/CodeSniffer/Standards/
git clone git@github.com:drugscom/DDC_CodeSniffer.git DDC
git clone git clone git@github.com:wimg/PHPCompatibility.git