There is no license information available for the latest version (0.3.5) of this package.

PHP_CodeSniffer rulesets supporting the coding standards for the Helsingborg Stad organization

Installs: 6 375

Dependents: 7

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Language:Shell

Type:phpcodesniffer-standard

0.3.5 2024-01-29 08:57 UTC

This package is auto-updated.

Last update: 2024-10-29 10:37:16 UTC


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.