Skip to content

Commit 49f2808

Browse files
committed
Fix some violations to "@DoctrineAnnotation" CS ruleset + Disallow "friendsofphp/php-cs-fixer" >= 3.10 in order to avoid inconsistencies with "phpdoc_order" rule
1 parent 70e9681 commit 49f2808

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+187
-188
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"doctrine/doctrine-bundle": "^2.3",
5555
"doctrine/mongodb-odm": "^2.3",
5656
"doctrine/orm": "^2.10.2",
57-
"friendsofphp/php-cs-fixer": "^3.4.0",
57+
"friendsofphp/php-cs-fixer": "^3.4.0,<3.10",
5858
"nesbot/carbon": "^2.55",
5959
"phpstan/phpstan": "^1.1",
6060
"phpstan/phpstan-doctrine": "^1.0",

src/Loggable/Document/LogEntry.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* Gedmo\Loggable\Document\LogEntry
1717
*
1818
* @MongoODM\Document(repositoryClass="Gedmo\Loggable\Document\Repository\LogEntryRepository")
19-
* @MongoODM\Index(keys={"objectId"="asc", "objectClass"="asc", "version"="asc"})
20-
* @MongoODM\Index(keys={"loggedAt"="asc"})
21-
* @MongoODM\Index(keys={"objectClass"="asc"})
22-
* @MongoODM\Index(keys={"username"="asc"})
19+
* @MongoODM\Index(keys={"objectId": "asc", "objectClass": "asc", "version": "asc"})
20+
* @MongoODM\Index(keys={"loggedAt": "asc"})
21+
* @MongoODM\Index(keys={"objectClass": "asc"})
22+
* @MongoODM\Index(keys={"username": "asc"})
2323
*/
2424
#[MongoODM\Document(repositoryClass: LogEntryRepository::class)]
2525
#[MongoODM\Index(keys: ['objectId' => 'asc', 'objectClass' => 'asc', 'version' => 'asc'])]

src/Loggable/Entity/LogEntry.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
*
1818
* @ORM\Table(
1919
* name="ext_log_entries",
20-
* options={"row_format":"DYNAMIC"},
21-
* indexes={
22-
* @ORM\Index(name="log_class_lookup_idx", columns={"object_class"}),
23-
* @ORM\Index(name="log_date_lookup_idx", columns={"logged_at"}),
24-
* @ORM\Index(name="log_user_lookup_idx", columns={"username"}),
25-
* @ORM\Index(name="log_version_lookup_idx", columns={"object_id", "object_class", "version"})
26-
* }
20+
* options={"row_format": "DYNAMIC"},
21+
* indexes={
22+
* @ORM\Index(name="log_class_lookup_idx", columns={"object_class"}),
23+
* @ORM\Index(name="log_date_lookup_idx", columns={"logged_at"}),
24+
* @ORM\Index(name="log_user_lookup_idx", columns={"username"}),
25+
* @ORM\Index(name="log_version_lookup_idx", columns={"object_id", "object_class", "version"})
26+
* }
2727
* )
2828
* @ORM\Entity(repositoryClass="Gedmo\Loggable\Entity\Repository\LogEntryRepository")
2929
*/

src/Translatable/Document/Translation.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
*
1818
* @ODM\Document(repositoryClass="Gedmo\Translatable\Document\Repository\TranslationRepository")
1919
* @ODM\UniqueIndex(name="lookup_unique_idx", keys={
20-
* "locale" = "asc",
21-
* "object_class" = "asc",
22-
* "foreign_key" = "asc",
23-
* "field" = "asc"
20+
* "locale": "asc",
21+
* "object_class": "asc",
22+
* "foreign_key": "asc",
23+
* "field": "asc"
2424
* })
2525
* @ODM\Index(name="translations_lookup_idx", keys={
26-
* "locale" = "asc",
27-
* "object_class" = "asc",
28-
* "foreign_key" = "asc"
26+
* "locale": "asc",
27+
* "object_class": "asc",
28+
* "foreign_key": "asc"
2929
* })
3030
*/
3131
#[ODM\Document(repositoryClass: TranslationRepository::class)]

src/Translatable/Entity/Translation.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
* Gedmo\Translatable\Entity\Translation
2020
*
2121
* @Table(
22-
* name="ext_translations",
23-
* options={"row_format":"DYNAMIC"},
24-
* indexes={
25-
* @Index(name="translations_lookup_idx", columns={
26-
* "locale", "object_class", "foreign_key"
27-
* }),
28-
* @Index(name="general_translations_lookup_idx", columns={
29-
* "object_class", "foreign_key"
30-
* })
31-
* },
32-
* uniqueConstraints={@UniqueConstraint(name="lookup_unique_idx", columns={
33-
* "locale", "object_class", "field", "foreign_key"
34-
* })}
22+
* name="ext_translations",
23+
* options={"row_format": "DYNAMIC"},
24+
* indexes={
25+
* @Index(name="translations_lookup_idx", columns={
26+
* "locale", "object_class", "foreign_key"
27+
* }),
28+
* @Index(name="general_translations_lookup_idx", columns={
29+
* "object_class", "foreign_key"
30+
* })
31+
* },
32+
* uniqueConstraints={@UniqueConstraint(name="lookup_unique_idx", columns={
33+
* "locale", "object_class", "field", "foreign_key"
34+
* })}
3535
* )
3636
* @Entity(repositoryClass="Gedmo\Translatable\Entity\Repository\TranslationRepository")
3737
*/

tests/Gedmo/Loggable/Fixture/Entity/Address.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
/**
1919
* @author Fabian Sabau <[email protected]>
2020
*
21-
* @ORM\Entity()
22-
* @Gedmo\Loggable()
21+
* @ORM\Entity
22+
* @Gedmo\Loggable
2323
*/
2424
#[ORM\Entity]
2525
#[Gedmo\Loggable]
2626
class Address
2727
{
2828
/**
2929
* @var int|null
30-
* @ORM\Id()
30+
* @ORM\Id
3131
* @ORM\Column(name="id", type="integer")
3232
* @ORM\GeneratedValue(strategy="AUTO")
3333
*/
@@ -39,7 +39,7 @@ class Address
3939
/**
4040
* @var string|null
4141
* @ORM\Column(type="string", length=191)
42-
* @Gedmo\Versioned()
42+
* @Gedmo\Versioned
4343
*/
4444
#[ORM\Column(type: Types::STRING, length: 191)]
4545
#[Gedmo\Versioned]
@@ -48,7 +48,7 @@ class Address
4848
/**
4949
* @var string|null
5050
* @ORM\Column(type="string", length=191)
51-
* @Gedmo\Versioned()
51+
* @Gedmo\Versioned
5252
*/
5353
#[ORM\Column(type: Types::STRING, length: 191)]
5454
#[Gedmo\Versioned]
@@ -57,7 +57,7 @@ class Address
5757
/**
5858
* @var Geo|null
5959
* @ORM\Embedded(class="Gedmo\Tests\Loggable\Fixture\Entity\Geo")
60-
* @Gedmo\Versioned()
60+
* @Gedmo\Versioned
6161
*/
6262
#[ORM\Embedded(class: Geo::class)]
6363
#[Gedmo\Versioned]

tests/Gedmo/Loggable/Fixture/Entity/Geo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Fabian Sabau <[email protected]>
2222
*
23-
* @ORM\Embeddable()
23+
* @ORM\Embeddable
2424
*/
2525
#[ORM\Embeddable]
2626
class Geo
@@ -29,7 +29,7 @@ class Geo
2929
* @var string|null
3030
* @phpstan-var numeric-string|null
3131
* @ORM\Column(type="decimal", precision=9, scale=6)
32-
* @Gedmo\Versioned()
32+
* @Gedmo\Versioned
3333
*/
3434
#[ORM\Column(type: Types::DECIMAL, precision: 9, scale: 6)]
3535
#[Gedmo\Versioned]
@@ -39,7 +39,7 @@ class Geo
3939
* @var string|null
4040
* @phpstan-var numeric-string|null
4141
* @ORM\Column(type="decimal", precision=9, scale=6)
42-
* @Gedmo\Versioned()
42+
* @Gedmo\Versioned
4343
*/
4444
#[ORM\Column(type: Types::DECIMAL, precision: 9, scale: 6)]
4545
#[Gedmo\Versioned]
@@ -48,7 +48,7 @@ class Geo
4848
/**
4949
* @var GeoLocation
5050
* @ORM\Embedded(class="Gedmo\Tests\Loggable\Fixture\Entity\GeoLocation")
51-
* @Gedmo\Versioned()
51+
* @Gedmo\Versioned
5252
*/
5353
#[ORM\Embedded(class: GeoLocation::class)]
5454
#[Gedmo\Versioned]

tests/Gedmo/Loggable/Fixture/Entity/GeoLocation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
*
2121
* @author Fabian Sabau <[email protected]>
2222
*
23-
* @ORM\Embeddable()
23+
* @ORM\Embeddable
2424
*/
2525
#[ORM\Embeddable]
2626
class GeoLocation
2727
{
2828
/**
2929
* @var string
3030
* @ORM\Column(type="string")
31-
* @Gedmo\Versioned()
31+
* @Gedmo\Versioned
3232
*/
3333
#[ORM\Column(type: Types::STRING)]
3434
#[Gedmo\Versioned]

tests/Gedmo/Mapping/Fixture/ClosureTreeClosure.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
/**
1919
* @ORM\Entity
2020
* @ORM\Table(
21-
* indexes={@ORM\Index(name="closure_tree_depth_idx", columns={"depth"})},
22-
* uniqueConstraints={@ORM\UniqueConstraint(name="closure_tree_unique_idx", columns={
23-
* "ancestor", "descendant"
24-
* })}
21+
* indexes={@ORM\Index(name="closure_tree_depth_idx", columns={"depth"})},
22+
* uniqueConstraints={@ORM\UniqueConstraint(name="closure_tree_unique_idx", columns={
23+
* "ancestor", "descendant"
24+
* })}
2525
* )
2626
*/
2727
#[ORM\Entity]

tests/Gedmo/Sluggable/Fixture/Document/Handler/Article.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ class Article
5050
* @var string|null
5151
*
5252
* @Gedmo\Slug(handlers={
53-
* @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\InversedRelativeSlugHandler", options={
54-
* @Gedmo\SlugHandlerOption(name="relationClass", value="Gedmo\Tests\Sluggable\Fixture\Document\Handler\RelativeSlug"),
55-
* @Gedmo\SlugHandlerOption(name="mappedBy", value="article"),
56-
* @Gedmo\SlugHandlerOption(name="inverseSlugField", value="alias")
57-
* })
53+
* @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\InversedRelativeSlugHandler", options={
54+
* @Gedmo\SlugHandlerOption(name="relationClass", value="Gedmo\Tests\Sluggable\Fixture\Document\Handler\RelativeSlug"),
55+
* @Gedmo\SlugHandlerOption(name="mappedBy", value="article"),
56+
* @Gedmo\SlugHandlerOption(name="inverseSlugField", value="alias")
57+
* })
5858
* }, separator="-", updatable=true, fields={"title", "code"})
5959
* @ODM\Field(type="string")
6060
*/

0 commit comments

Comments
 (0)