The Crawl Coding Standard (PHP CodeSniffer)
Go to file
Gertjan Krol 64e6b7cd52
Validate / validate_package (push) Successful in 10s Details
1.1.2 - Bumped dependencies
2023-09-01 20:06:55 +02:00
.forgejo/workflows Release 1.1.0 2023-05-28 22:20:39 +02:00
config Initial commit & release 2022-08-20 00:50:26 +02:00
src/rulesets (1.1.1) Hotfix: fix `slevomat-coding-standard` ruleset 2023-05-28 22:39:25 +02:00
.gitignore Initial commit & release 2022-08-20 00:50:26 +02:00
.gitlab-ci.yml Initial commit & release 2022-08-20 00:50:26 +02:00
CHANGELOG.md 1.1.2 - Bumped dependencies 2023-09-01 20:06:55 +02:00
CONTRIBUTING.md Initial commit & release 2022-08-20 00:50:26 +02:00
LICENSE.md Release 1.1.0 2023-05-28 22:20:39 +02:00
README.md Release 1.1.0 2023-05-28 22:20:39 +02:00
composer.json 1.1.2 - Bumped dependencies 2023-09-01 20:06:55 +02:00

README.md

Crawl Coding Standard

Latest Version on Packagist Total Downloads

This package provides rule sets for the Crawl Coding Standard. It requires squizlabs/php_codesniffer and some extensions (see composer.json).

Installation

You can install the package via composer (you should only need it for development):

composer require crawl/coding-standard --dev

Usage

Depending on your project, copy phpcs-laravel.xml or phpcs-package.xml from config/ to your project.

Note: don't forget to update Package\Namespace when using phpcs-package.xml.

You can then run PHP Code Sniffer/Beautifier:

$ vendor/bin/phpcs --standard=./path/to/copied/phpcs.xml
$ vendor/bin/phpcbf --standard=./path/to/copied/phpcs.xml

For easier usage, add the following to scripts in your project's composer.json:

    ...
    "scripts": {
        ...
        "style": "vendor/bin/phpcs --standard=./path/to/copied/phpcs.xml",
        "fix-style": "vendor/bin/phpcbf --standard=./path/to/copied/phpcs.xml",
    }.
    ...

You can then use composer style to run the sniffer, and composer fix-style to run the beautifier.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email security@gkcld.net instead of using the issue tracker.

Authors

License

The MIT License (MIT). Please see LICENSE for more information.