Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

[CodingStandard] Add DoctrineAnnotationNestedBracketsFixer #3396

Merged
merged 3 commits into from
Jul 10, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jul 9, 2021

Solves doctrine/annotations#418 (comment)

 /**
- * @MainAnnotation(
+ * @MainAnnotation({
  *     @NestedAnnotation('one'),
  *     @NestedAnnotation('two'),
- * )
+ * })
 */

Use and Configure

# ecs.php

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\CodingStandard\Fixer\Annotation\DoctrineAnnotationNestedBracketsFixer;

return static function (ContainerConfigurator $containerConfigurator): void {
    $services = $containerConfigurator->services();
    $services->set(LineLengthFixer::class);
    
    $services->set(DoctrineAnnotationNestedBracketsFixer::class)
        ->call('configure', [[
                DoctrineAnnotationNestedBracketsFixer::ANNOTATION_CLASSES => [
                    'MainAnnotation' 
                ]
        ]]);
    ]);
};

@TomasVotruba TomasVotruba force-pushed the tv-cs-brackes-nested branch 2 times, most recently from d329d31 to e005544 Compare July 9, 2021 23:11
@TomasVotruba TomasVotruba force-pushed the tv-cs-brackes-nested branch 5 times, most recently from e0ae993 to 5d5830b Compare July 9, 2021 23:41
@TomasVotruba TomasVotruba enabled auto-merge (squash) July 9, 2021 23:41
@TomasVotruba TomasVotruba force-pushed the tv-cs-brackes-nested branch from 5d5830b to edc3dbf Compare July 10, 2021 00:46
@TomasVotruba TomasVotruba merged commit 16df9f4 into main Jul 10, 2021
@TomasVotruba TomasVotruba deleted the tv-cs-brackes-nested branch July 10, 2021 00:49
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant