Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fabc639

Browse files
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

‎README.md

Lines changed: 7 additions & 1 deletion
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

‎src/coding_style.php

Lines changed: 2 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /