Download the PHP package ggrible/coding-standards without Composer
On this page you can find all versions of the php package ggrible/coding-standards. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package coding-standards
📝 Coding Standards
The WordPress coding standards applied to all WP Jazz projects.
Provides a set of rulesets and extensions for:
- EditorConfig — Maintain consistent coding styles between different editors.
- PHP_CodeSniffer — PHP coding linter.
- PHPStan — PHP static analysis tool.
- Psalm — PHP static analysis tool.
These coding standards are heavily based on, and extend, Human Made Coding Standards.
Installation
This package will install supported versions of PHPCS, PHPStan, and Psalm.
See the examples directory for boilerplate configuration files.
Using PHPCS
Our PHPCS ruleset extends the Human Made coding standards for PHP and WordPress.
Run the following command to run the standards checks:
Or include the following in your phpcs.xml:
The PHPCS ruleset is based upon:
With customisations, exclusions, and additions to match our style.
Using PHPStan
Run the following command to run the static analysis:
Make PHPStan find it automatically using phpstan/extension-installer:
Or manually include it in your phpstan.neon:
See the szepeviktor/phpstan-wordpress package, by Viktor Szépe, for more information on configuring PHPStan.
Using Psalm
Use Psalm to enable the plugin:
Or manually include it in your psalm.xml:
See the humanmade/psalm-plugin-wordpress package, by Human Made, for more information on configuring Psalm.
Using ESLint
We recommend using the Human Made coding standards for JavaScript which uses ESLint.
See the @humanmade/eslint-config package README for more information on configuring ESLint.
Using Stylelint
We recommend using the Human Made coding standards for CSS and SCSS which uses Stylelint.
See the @humanmade/stylelint package README for more information on configuring Stylelint.