Skip to content

Commit

Permalink
Update doc and standards
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 30, 2024
1 parent ced706d commit b134b82
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ To use these rules, you have to [allow non-fixable rules](configuration.md#non-f
- `ignoredSubDirectories`: specific sub-directories to ignore.
- `optionalPrefix`: allow to prefix file name by this prefix.

- **NamedArgumentNameRule**:

Ensures named arguments uses snake_case. Options are:
- `case`: preferred case to use (default snake_case).

- **VariableNameRule** (Configurable):

Ensures that variable name uses snake_case. Options are:
Expand Down Expand Up @@ -154,6 +159,7 @@ new TwigCsFixer\Rules\Whitespace\IndentRule(3);

**Twig**:
- DelimiterSpacingRule
- NamedArgumentNameRule
- NamedArgumentSpacingRule
- OperatorNameSpacingRule
- OperatorSpacingRule
Expand Down
2 changes: 2 additions & 0 deletions src/Standard/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace TwigCsFixer\Standard;

use TwigCsFixer\Rules\Delimiter\DelimiterSpacingRule;
use TwigCsFixer\Rules\Function\NamedArgumentNameRule;
use TwigCsFixer\Rules\Function\NamedArgumentSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorNameSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorSpacingRule;
Expand All @@ -22,6 +23,7 @@ public function getRules(): array
{
return [
new DelimiterSpacingRule(),
new NamedArgumentNameRule(),
new NamedArgumentSpacingRule(),
new OperatorNameSpacingRule(),
new OperatorSpacingRule(),
Expand Down
2 changes: 2 additions & 0 deletions tests/Standard/TwigCsFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use TwigCsFixer\Rules\Delimiter\BlockNameSpacingRule;
use TwigCsFixer\Rules\Delimiter\DelimiterSpacingRule;
use TwigCsFixer\Rules\Function\IncludeFunctionRule;
use TwigCsFixer\Rules\Function\NamedArgumentNameRule;
use TwigCsFixer\Rules\Function\NamedArgumentSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorNameSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorSpacingRule;
Expand All @@ -31,6 +32,7 @@ public function testGetRules(): void

static::assertEquals([
new DelimiterSpacingRule(),
new NamedArgumentNameRule(),
new NamedArgumentSpacingRule(),
new OperatorNameSpacingRule(),
new OperatorSpacingRule(),
Expand Down
2 changes: 2 additions & 0 deletions tests/Standard/TwigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use PHPUnit\Framework\TestCase;
use TwigCsFixer\Rules\Delimiter\DelimiterSpacingRule;
use TwigCsFixer\Rules\Function\NamedArgumentNameRule;
use TwigCsFixer\Rules\Function\NamedArgumentSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorNameSpacingRule;
use TwigCsFixer\Rules\Operator\OperatorSpacingRule;
Expand All @@ -21,6 +22,7 @@ public function testGetRules(): void

static::assertEquals([
new DelimiterSpacingRule(),
new NamedArgumentNameRule(),
new NamedArgumentSpacingRule(),
new OperatorNameSpacingRule(),
new OperatorSpacingRule(),
Expand Down

0 comments on commit b134b82

Please sign in to comment.