From 0de4370b418c473e8b07368562f842ea0fc2ea8a Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 1 Jul 2018 18:37:04 +0200 Subject: [PATCH] README: add --with-style option [skip ci] --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 575fede033d..a3fd11b6bed 100644 --- a/README.md +++ b/README.md @@ -143,19 +143,14 @@ You don't have to always write PHP code. Many projects change only classes or me - [Dynamic Rectors](/docs/DynamicRectors.md) - [Turn Magic to Methods](/docs/MagicDisclosureRectors.md) -## Coding Standards are Outsourced +## How to Apply Coding Standards? -This package has no intention in formatting your code, as **coding standard tools handle this much better**. We prefer [EasyCodingStandard](https://github.com/Symplify/EasyCodingStandard) with Rector's prepared set: +Rector uses [EasyCodingStandard](https://github.com/Symplify/EasyCodingStandard) to improve the code style of changed files, like import namespaces, make 1 empty line between class elements etc. + +It's always better to use own project's prepared set, but if you don't have the option yet, just use `--with-style` option to handle these basic cases: ```bash -# install -composer require --dev symplify/easy-coding-standard - -# check -vendor/bin/ecs check --config vendor/rector/rector/ecs-after-rector.yml - -# fix -vendor/bin/ecs check --config vendor/rector/rector/ecs-after-rector.yml --fix +vendor/bin/rector process src --with-style ``` ## More Detailed Documentation