Skip to content

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

License

Notifications You must be signed in to change notification settings

flex-is/php-cs-fixer-config

Repository files navigation

Configuration for PHP Coding Standards Fixer

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.