Skip to content

Commit

Permalink
Apply PHP-CS-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Oct 29, 2023
1 parent 88838ce commit 40bd537
Show file tree
Hide file tree
Showing 281 changed files with 656 additions and 73 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
}
},
"scripts": {
"fix-cs": "php-cs-fixer fix",
"fix-cs-test": "php-cs-fixer fix --ansi --verbose --diff --dry-run"
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.dist.php"
}
}
1 change: 1 addition & 0 deletions src/AbstractTrackingListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function getSubscribedEvents()
* Maps additional metadata for the object.
*
* @param LoadClassMetadataEventArgs $eventArgs
*
* @phpstan-param LoadClassMetadataEventArgs<ClassMetadata<object>, ObjectManager> $eventArgs
*
* @return void
Expand Down
6 changes: 3 additions & 3 deletions src/Blameable/Mapping/Driver/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public function readExtendedMetadata($meta, array &$config)
$class = $this->getMetaReflectionClass($meta);
// property annotations
foreach ($class->getProperties() as $property) {
if ($meta->isMappedSuperclass && !$property->isPrivate() ||
$meta->isInheritedField($property->name) ||
isset($meta->associationMappings[$property->name]['inherited'])
if ($meta->isMappedSuperclass && !$property->isPrivate()
|| $meta->isInheritedField($property->name)
|| isset($meta->associationMappings[$property->name]['inherited'])
) {
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions src/Blameable/Traits/BlameableDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ trait BlameableDocument
{
/**
* @var string
*
* @Gedmo\Blameable(on="create")
*
* @ODM\Field(type="string")
*/
#[ODM\Field(type: Type::STRING)]
Expand All @@ -31,7 +33,9 @@ trait BlameableDocument

/**
* @var string
*
* @Gedmo\Blameable(on="update")
*
* @ODM\Field(type="string")
*/
#[ODM\Field(type: Type::STRING)]
Expand Down
4 changes: 4 additions & 0 deletions src/Blameable/Traits/BlameableEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ trait BlameableEntity
{
/**
* @var string
*
* @Gedmo\Blameable(on="create")
*
* @ORM\Column(nullable=true)
*/
#[ORM\Column(nullable: true)]
Expand All @@ -30,7 +32,9 @@ trait BlameableEntity

/**
* @var string
*
* @Gedmo\Blameable(on="update")
*
* @ORM\Column(nullable=true)
*/
#[ORM\Column(nullable: true)]
Expand Down
6 changes: 3 additions & 3 deletions src/IpTraceable/Mapping/Driver/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function readExtendedMetadata($meta, array &$config)
$class = $this->getMetaReflectionClass($meta);
// property annotations
foreach ($class->getProperties() as $property) {
if ($meta->isMappedSuperclass && !$property->isPrivate() ||
$meta->isInheritedField($property->name) ||
isset($meta->associationMappings[$property->name]['inherited'])
if ($meta->isMappedSuperclass && !$property->isPrivate()
|| $meta->isInheritedField($property->name)
|| isset($meta->associationMappings[$property->name]['inherited'])
) {
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions src/IpTraceable/Traits/IpTraceableDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ trait IpTraceableDocument
{
/**
* @var string
*
* @Gedmo\IpTraceable(on="create")
*
* @ODM\Field(type="string")
*/
#[ODM\Field(type: Type::STRING)]
Expand All @@ -31,7 +33,9 @@ trait IpTraceableDocument

/**
* @var string
*
* @Gedmo\IpTraceable(on="update")
*
* @ODM\Field(type="string")
*/
#[ODM\Field(type: Type::STRING)]
Expand Down
4 changes: 4 additions & 0 deletions src/IpTraceable/Traits/IpTraceableEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ trait IpTraceableEntity
{
/**
* @var string
*
* @Gedmo\IpTraceable(on="create")
*
* @ORM\Column(length=45, nullable=true)
*/
#[ORM\Column(length: 45, nullable: true)]
Expand All @@ -30,7 +32,9 @@ trait IpTraceableEntity

/**
* @var string
*
* @Gedmo\IpTraceable(on="update")
*
* @ORM\Column(length=45, nullable=true)
*/
#[ORM\Column(length: 45, nullable: true)]
Expand Down
1 change: 1 addition & 0 deletions src/Loggable/Document/LogEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Gedmo\Loggable\Document\LogEntry
*
* @MongoODM\Document(repositoryClass="Gedmo\Loggable\Document\Repository\LogEntryRepository")
*
* @MongoODM\Index(keys={"objectId": "asc", "objectClass": "asc", "version": "asc"})
* @MongoODM\Index(keys={"loggedAt": "asc"})
* @MongoODM\Index(keys={"objectClass": "asc"})
Expand Down
3 changes: 3 additions & 0 deletions src/Loggable/LoggableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public function getSubscribedEvents()
* Maps additional metadata
*
* @param LoadClassMetadataEventArgs $eventArgs
*
* @phpstan-param LoadClassMetadataEventArgs<ClassMetadata<object>, ObjectManager> $eventArgs
*
* @return void
Expand Down Expand Up @@ -209,9 +210,11 @@ public function onFlush(EventArgs $eventArgs)
* Get the LogEntry class
*
* @param string $class
*
* @phpstan-param class-string $class
*
* @return string
*
* @phpstan-return class-string<LogEntryInterface<T>>
*/
protected function getLogEntryClass(LoggableAdapter $ea, $class)
Expand Down
1 change: 1 addition & 0 deletions src/Loggable/Mapping/Event/LoggableAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface LoggableAdapter extends AdapterInterface
* Get the default object class name used to store the log entries.
*
* @return string
*
* @phpstan-return class-string
*/
public function getDefaultLogEntryClass();
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Blameable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* Blameable annotation for Blameable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author David Buchmann <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/IpTraceable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* IpTraceable annotation for IpTraceable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Pierre-Charles Bertineau <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Language annotation for Translatable behavioral extension
*
* @Annotation
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Locale annotation for Translatable behavioral extension
*
* @Annotation
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Loggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
* @phpstan-template T of LogEntryInterface
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
3 changes: 3 additions & 0 deletions src/Mapping/Annotation/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* to be user like "@ReferenceMany(type="entity", class="MyEntity", identifier="entity_id")"
*
* @author Bulat Shakirzyanov <[email protected]>
*
* @Annotation
*/
abstract class Reference implements GedmoAnnotation
Expand All @@ -25,12 +26,14 @@ abstract class Reference implements GedmoAnnotation

/**
* @var string|null
*
* @phpstan-var 'entity'|'document'|null
*/
public $type;

/**
* @var string|null
*
* @phpstan-var class-string|null
*/
public $class;
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/ReferenceIntegrity.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* ReferenceIntegrity annotation for ReferenceIntegrity behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Evert Harmeling <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/ReferenceMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
* to be user like "@ReferenceMany(type="entity", class="MyEntity", identifier="entity_id")"
*
* @author Bulat Shakirzyanov <[email protected]>
*
* @NamedArgumentConstructor
*
* @Annotation
*
* @final since gedmo/doctrine-extensions 3.11
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/ReferenceManyEmbed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @NamedArgumentConstructor
*
* @Annotation
*
* @final since gedmo/doctrine-extensions 3.11
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* Slug annotation for Sluggable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/SlugHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* SlugHandler annotation for Sluggable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/SlugHandlerOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* SlugHandlerOption annotation for Sluggable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/SoftDeleteable.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
* @author Gustavo Falco <[email protected]>
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/SortableGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @author Lukas Botsch <[email protected]>
*
* @Annotation
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY)]
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/SortablePosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @author Lukas Botsch <[email protected]>
*
* @Annotation
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY)]
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Timestampable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* Timestampable annotation for Timestampable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* Translatable annotation for Translatable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/TranslationEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* TranslationEntity annotation for Translatable behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* Tree annotation for Tree behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/TreeClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
* TreeClosure annotation for Tree behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/TreeLeft.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* TreeLeft annotation for Tree behavioral extension
*
* @Annotation
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions src/Mapping/Annotation/TreeLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
* TreeLevel annotation for Tree behavioral extension
*
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/TreeLockTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* TreeLockTime annotation for Tree behavioral extension
*
* @Annotation
*
* @Target("PROPERTY")
*
* @author Gustavo Falco <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/Annotation/TreeParent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* TreeParent annotation for Tree behavioral extension
*
* @Annotation
*
* @Target("PROPERTY")
*
* @author Gediminas Morkevicius <[email protected]>
Expand Down
Loading

0 comments on commit 40bd537

Please sign in to comment.