Skip to content

Instantly share code, notes, and snippets.

@bezierer
Last active October 28, 2017 16:40
Show Gist options
  • Save bezierer/d5fd556bfc4e1de81d42644a79a7c23b to your computer and use it in GitHub Desktop.
Save bezierer/d5fd556bfc4e1de81d42644a79a7c23b to your computer and use it in GitHub Desktop.
How to install PHP code inspection tools using homebrew-php and how to integrate with JetBrain's IntelliJ or PhpStorm

Inspection Tools with homebrew-php and WordPress Coding Standards

Prerequisites

  • Homebrew is installed

Step 1: Installing homebrew-php

  1. brew tap homebrew/dupes
  2. brew tap josegonzalez/homebrew-php
  3. brew install PHP70 (or other version of your choice)

Step 2: Installing PHP Code Sniffer

  1. brew install php-code-sniffer
  2. brew install phpcs

Step 3: Installing PHP Mess Detector

  1. brew install phpmd

Step 4: Install WordPress Coding Standards

  1. cd ~
  2. mkdir Utilities
  3. cd Utilities
  4. git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment