Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.28 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.28 KB

Isotop WordPress Coding Standard

The coding standard used for WordPress sites.

Installation

Standalone

Standards are provided as a Composer package and can be installed with:

composer create-project isotopsweden/isotopcs:dev-master

Composer will automatically install dependencies, register standards paths, and set default PHP Code Sniffer standard to Isotop.

As dependency

You should update minimum-stability to dev and set prefer-stable to true.

{
  "minimum-stability": "dev",
  "prefer-stable": true
}

Then you can install isotopcs as a dependency.

composer require isotopsweden/isotopcs:dev-master --dev

Command line

vendor/bin/phpcs --extensions=php /path/to/folder/

Editors

Atom

Use linter-phpcs.

Sublime

{
  "phpcs_executable_path": "/path/to/isotopcs/vendor/bin/phpcs",
  "phpcs_additional_args": {
    "--standard": "Isotop"
  }
}

PhpStorm

Refer to Using PHP Code Sniffer Tool in PhpStorm documentation.

After installation Isotop standard will be available as a choice in PHP Code Sniffer Validation inspection.