From 267cc45bf7001805c1cbe88b57b9ad02c4b14d56 Mon Sep 17 00:00:00 2001 From: Joseph Scott Date: Wed, 22 May 2024 22:24:00 -0600 Subject: [PATCH] Describe how to use this --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39068dc..1ab6ed5 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -# phpcsfixer-config \ No newline at end of file +# phpcsfixer-config + +### Install + +``` +composer require --dev josephscott/phpcsfixer-config +``` + +Create a `.php-cs-fixer.dist.php` in the top level directory of your +repo with: + +``` +get_config(); +``` + +If you want to make alterations, all of the rules and options are available +via public attributes on the `JosephScott\PHPCSFixer_Config()` object. Here +is how you would alter the `array_indention` rule and the indent config +option: + +``` +$fixer_config = new JosephScott\PHPCSFixer_Config( __DIR__ ); +$fixer_config->config_indent = ' '; +$fixer_config->rules['array_indention'] = false; +return $fixer_config->get_config(); +```