Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.

WebDevStudios/php-coding-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebDevStudios. WordPress for big brands.


This package is DEPRECATED and no longer in use at WebDevStudios and will no longer be maintained.


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