Ready to use and highly opinionated php cs fixer config based on my and community standards
Most of my projects use a very consistent set of coding standards rules and project hierarchy. Rather than
copying the same PHP Coding Standards Fixer config file
.php_cs file across different projects and then
trying to figure out which project had the latest copy, I've created this composer package as a way to
include the same set of rules into every project via composer.
These standards are based on the community's best practices and PSR standards in addition to what I personally consider to be good taste. You may freely use this configuration if you want, but do note that it may change and evolve as time passes since I reserve the right to change my mind.
To add these rules into your project, you should first include them via composer as dev dependency using
$ composer require --dev riimu/php-cs-fixer-config
Then you should create a file named
.php_cs in your project root directory that simply contains
<?php return require __DIR__ . '/vendor/riimu/php-cs-fixer-config/config.php';
The rules from the config will now be applied to files inside
tests directories (if they exist),
when you run php-cs-fixer normally in the project root, e.g.
$ php-cs-fixer fix --dry-run -v --diff --diff-format=udiff
This package is Copyright (c) 2018 Riikka Kalliomäki.
See LICENSE for license and copying information.