Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 5, 2024
1 parent 79ff979 commit 85d7bf8
Show file tree
Hide file tree
Showing 21 changed files with 2 additions and 40 deletions.
2 changes: 0 additions & 2 deletions src/Annotation/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target({"PROPERTY", "ANNOTATION", "CLASS"})
*/
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Embeddable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Inheritance/DiscriminatorColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Inheritance/JoinedTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Inheritance/SingleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/BelongsTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/Embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/HasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/HasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/Inverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target({"PROPERTY", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/ManyToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/Morphed/BelongsToMorphed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/Morphed/MorphedHasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/Morphed/MorphedHasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Relation/RefersTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("PROPERTY")
*/
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target({"CLASS", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Table/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("ANNOTATION", "CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE), NamedArgumentConstructor]
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Table/PrimaryKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

/**
* @Annotation
*
* @NamedArgumentConstructor
*
* @Target("ANNOTATION", "CLASS")
*/
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/AnnotationRequiredArgumentsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function createFor(\ReflectionProperty $property, string $annotati

$requiredArguments = [];
foreach ($column->getConstructor()?->getParameters() ?? [] as $parameter) {
if (! $parameter->isOptional()) {
if (!$parameter->isOptional()) {
$requiredArguments[] = $parameter->getName();
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Annotated/Functional/Driver/Common/TableTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function testCompositePrimaryKey(ReaderInterface $reader): void
#[DataProvider('singularReadersProvider')]
public function testIndexWithEmptyColumnsShouldThrowAnException(ReaderInterface $reader): void
{
$this->expectException(\Cycle\Annotated\Exception\AnnotationException::class);
$this->expectException(AnnotationException::class);
$this->expectExceptionMessage('Invalid index definition for `compositePost`. Column list can\'t be empty.');

$r = new Registry($this->dbal);
Expand Down

0 comments on commit 85d7bf8

Please sign in to comment.