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

[CodingStandard] Add anntotation new-line indent rule #2078

Merged
merged 4 commits into from
Aug 18, 2020

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Aug 18, 2020

 /**
- * @ORM\Table(name="table_name", indexes={@ORM\Index(name="...", columns={"..."}), @ORM\Index(name="...", columns={"..."})})
+ * @ORM\Table(name="table_name", indexes={
+ *     @ORM\Index(name="...", columns={"..."}), 
+ *     @ORM\Index(name="...", columns={"..."})
+ * })
  */
class SomeEntity
{
}

Enable in your ecs.php today!

<?php

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\Configuration\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();
    $parameters->set(Option::SETS, [
        SetList::DOCTRINE_ANNOTATIONS,
    ]);
};

Indent is handled by DoctrineAnnotationIndentationFixer rule

@TomasVotruba TomasVotruba force-pushed the cs-entity-nested branch 3 times, most recently from b9e7fbe to 35bf7cb Compare August 18, 2020 12:23
@kodiakhq kodiakhq bot merged commit 36cbe5e into master Aug 18, 2020
@kodiakhq kodiakhq bot deleted the cs-entity-nested branch August 18, 2020 12:41
TomasVotruba added a commit that referenced this pull request Sep 11, 2020
* [CodingStandard] Add anntotation new-line indent rule

* [CS] update README and prepare for split

* [CS] Split long god-README to smaller 3 files files - fixes, sniff and rules

* [rector] [CS] Split long god-README to smaller 3 files files - fixes, sniff and rules

Co-authored-by: rector-bot <[email protected]>
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Nov 14, 2021
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