flexis/php-cs-fixer-config

Provides common configurations for friendsofphp/php-cs-fixer, used within FLEX-IS

v0.1.1 2023-04-09 20:35 UTC

This package is auto-updated.

Last update: 2024-05-17 11:05:27 UTC


README

Version Build Coverage License: MIT

This repository was created for the purpose of introducing uniform coding standards for PHP code within FLEX-IS.

It is based on the ideas of refinery29/php-cs-fixer-config.

Installation

Install this package via composer:

$ composer require --dev flexis/php-cs-fixer-config

Create a configuration file .php-cs-fixer.dist.php:

  1. Create Finder with paths to the source code.
  2. Choose a set of rules according to the target PHP version.
  3. (optional) Set header comment.
  4. Set cache filename and add it to the .gitignore.
    • .php-cs-fixer.cache

Usage

To fix coding standards manually, run:

$ php vendor/bin/php-cs-fixer fix

💡 See the official documentation for more examples.

License

This package is licensed using the MIT License.