Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more coding standard rules #4474

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Nov 25, 2024

No description provided.

@stof
Copy link
Member

stof commented Nov 25, 2024

IIRC, there was a discussion on the Symfony repo reporting that Twig coding standards don't define the spacing rule around the = operator in macro argument declarations and around the = or : separators for named arguments.
Maybe those could be defined as well.

@VincentLanglet
Copy link
Contributor

IIRC, there was a discussion on the Symfony repo reporting that Twig coding standards don't define the spacing rule around the = operator in macro argument declarations and around the = or : separators for named arguments. Maybe those could be defined as well.

For the record, currently Twig-CS-Fixer consider it should be

foo(name_arg=42) // no space at all

and

foo(name_args: 42) // one space after

cf
https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/src/Rules/Function/NamedArgumentSpacingRule.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants