webdevstudios/php-coding-standards

This package is abandoned and no longer maintained. The author suggests using the wp-coding-standards/wpcs package instead.

In-house PHP linting and coding standards for WebDevStudios

Installs: 4 484

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 3

Forks: 0

Open Issues: 20

Type:phpcodesniffer-standard

1.3.0 2020-11-16 21:56 UTC

README

WebDevStudios. WordPress for big brands.

WebDevStudios PHP Coding Standards

Install

To install in your project, use:

composer require webdevstudios/php-coding-standards:~1.3.0 --dev

Then add a .phpcs.xml.dist file to your project:

<?xml version="1.0"?>
<ruleset name="Project">
    <rule ref="WebDevStudios"/>
</ruleset>

To do this quickly, run:

echo '<?xml version="1.0"?><ruleset name="Project"><rule ref="WebDevStudios"/></ruleset>' > .phpcs.xml.dist

Installation will automatically install WebDevStudios standard for vendor/bin/phpcs.

CLI Linting

Lint a single file

./vendor/bin/phpcs -s path/to/file.php

Lint multiple files

./vendor/bin/phpcs -s --extensions=php /path/to/dir

Editor Linting

In your favorite editor install it's phpcs package and it will automatically detect your phpcs.xml.dist file and lint any PHP file you have open. You may need to re-configure your settings if you are moving from WDS-Coding-Standards.

Changelog

See Releases on Github