k10r/twig-cs-fixer

Composer package to fix twig codestyle

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Package info

github.com/kellerkinderDE/twig-cs-fixer

Type:project

pkg:composer/k10r/twig-cs-fixer

Statistics

Installs: 401

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

0.0.3 2022-02-23 17:04 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 0d2c5be3067b1bfa144759aaa5e5b5befa9566c9

  • Kellerkinder GmbH <anfragen.woop@kellerkinder.de>
  • a.wink <a.wink.woop@kellerkinder.de>

twigfixerk10rtwig-cs-fixer

This package is auto-updated.

Last update: 2024-03-06 12:05:12 UTC


README

Implemented Rules

Function Implemented
Indentation X
PipePrefixSpacing X
PipeSuffixSpacing X
SpaceLine X
TrailingSpace X
UppercaseVariables X
@var style
Your idea

Setup

  1. Go to your project folder and execute composer require k10r/twig-cs-fixer --dev
  2. Create a file named .twig_cs .twig_cs.dist or .twig_cs.dist.php
  3. (Optional) Adjust the executed fixers according to your needs
  4. Execute the fixer via vendor/bin/twig-cs-fixer

Known issues

  • JavaScript (eg. everything inside <script>-blocks) is not touched
  • Multiple calls for the same function example:{% set - some with and some without closing block
  • Attribute tags are not sorted
  • Multi-Line-Attributes with additional opening tag (eg. (, [) are not formatted correctly