Skip to content

Commit fabc639

Browse files
committed
docs: explain how to use spaces to indent
1 parent 499e330 commit fabc639

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@
4747

4848
- Lints PHP using PSR-12
4949
- Extends some config (you can see all the rules [here](src/coding_style.php))
50-
- Use tabs to indent ([reason](https://www.youtube.com/watch?v=yD2T42zsP7c))
50+
- Use tabs to indent ([reason](https://www.youtube.com/watch?v=yD2T42zsP7c)). If you want to use spaces, you can add the
51+
following line at the end of your `ecs.php`:
52+
```php
53+
use Symplify\EasyCodingStandard\ValueObject\Option;
54+
55+
$ecsConfig->indentation(Option::INDENTATION_SPACES);
56+
```
5157

5258
## 📦 How to release a new version
5359

Diff for: src/coding_style.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
5353
use Symplify\CodingStandard\Fixer\Strict\BlankLineAfterStrictTypesFixer;
5454
use Symplify\EasyCodingStandard\Config\ECSConfig;
55+
use Symplify\EasyCodingStandard\ValueObject\Option;
5556
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
5657

5758
return static function (ECSConfig $ecsConfig): void {
@@ -123,5 +124,5 @@
123124
$ecsConfig->ruleWithConfiguration(PhpUnitMethodCasingFixer::class, ['case' => PhpUnitMethodCasingFixer::SNAKE_CASE]);
124125
$ecsConfig->ruleWithConfiguration(OrderedTypesFixer::class, ['null_adjustment' => 'always_last']);
125126

126-
$ecsConfig->indentation('tab');
127+
$ecsConfig->indentation(Option::INDENTATION_TAB);
127128
};

0 commit comments

Comments
 (0)