schnittstabil/sugared-php-cs-fixer

This package is abandoned and no longer maintained. The author suggests using the sugared-rim/php-cs-fixer package instead.

PHP-CS-Fixer sweetened with ease

2.1.0 2018-03-31 21:43 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:57:37 UTC


README

SensioLabsInsight

PHP-CS-Fixer sweetened with ease 🍒

SugaredRim\PHP-CS-Fixer takes an opinionated view of code style checking with PHP-CS-Fixer, it is preconfigured to get you up and running as quickly as possible.

Install

$ composer require --dev sugared-rim/php-cs-fixer

Usage

Instead of running php-cs-fixer with all its options, just run sugared-rim-php-cs-fixer - that's it:

{
    ...
    "require-dev": {
        "sugared-rim/php-cs-fixer": ...
    },
    "scripts": {
        "lint": "sugared-rim-php-cs-fixer"
    }
}

Configuration

You may overwrite some options by putting it in your composer.json.

Some of the default settings:

{
    ...
    "scripts": {
        "lint": "sugared-rim-php-cs-fixer"
    },
    "extra": {
        "sugared-rim/php-cs-fixer": {
            "diff": true,
            "dry-run": true,
            "cache": true,
            "path": {
                "in": [
                    "."
                ],
                "name": [
                    "*.php",
                    "*.phtml",
                    "*.twig",
                    "*.xml",
                    "*.yml"
                ],
                "exclude": [
                    "build",
                    "bower_components",
                    "node_modules",
                    "vendor"
                ],
                "ignoreDotFiles": true,
                "ignoreVCS": true
            }
        }
    }
}

License

MIT © Michael Mayer