helsingborg-stad/phpcs
PHP_CodeSniffer rulesets supporting the coding standards for the Helsingborg Stad organization
Maintainers
Package info
github.com/helsingborg-stad/phpcs
Language:Shell
Type:phpcodesniffer-standard
pkg:composer/helsingborg-stad/phpcs
Requires
- php: >=7.4
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- squizlabs/php_codesniffer: ^3.0
- wp-coding-standards/wpcs: ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
Unknown License 8cc871e0087af071554669707cef42fc02a15da3
- Thor Brink <thor.brink.woop@helsingborg.se>
README
Installation
Run the following from the root of your project:
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev helsingborg-stad/phpcs
Available rulesets
Hbg-WordPress
Specific ruleset for WordPress themes and plugins.
Example Usage
<?xml version="1.0"?> <ruleset name="Some Wordpress Plugin"> <file>./source/php</file> <file>./tests</file> <rule ref="Hbg-WordPress"></rule> </ruleset>
Available composer binaries
Included are 2 binaries for running phpcs and phpcbf on changed files only. The changes in the current branch are compared to supplied branch, and are meant to be used in a CI environment.
Examples
vendor/bin/phpcs-changed origin/main
This example runs phpcs on all changed files in the current branch compared to origin/main.
vendor/bin/phpcbf-changed origin/main
This example runs phpcbf on all changed files in the current branch compared to origin/main.
