Easy steps to install php-code-sniffer package on Mac

Package Information:

Application Name – php-code-sniffer
What is php-code-sniffer – Not Available for php-code-sniffer
Use of php-code-sniffer – Check coding standards in PHP, JavaScript and CSS
URL – https://github.com/squizlabs/PHP_CodeSniffer/

Installation Steps:

  1. Open Terminal using Spotlight search by pressing  <command+space>. Type terminal and hit  Enter  key.
  2. spotlight search terminal

  3. Now, run following command to install homebrew (brew)
  4. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

    Homebrew Install Command Screenshot

  5. Install php-code-sniffer using brew
    brew install php-code-sniffer

php-code-sniffer  is ready to use now!