Skip to content

Commit 0e0ef8a

Browse files
committed
CS fix
1 parent 0273586 commit 0e0ef8a

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/Metadata/Subscriber/AttributeSubscriberMetadataFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use ReflectionNamedType;
1717

1818
use function array_key_exists;
19+
use function count;
1920

2021
final class AttributeSubscriberMetadataFactory implements SubscriberMetadataFactory
2122
{
@@ -58,7 +59,7 @@ public function metadata(string $subscriber): SubscriberMetadata
5859
$subscriber,
5960
$eventClass,
6061
$subscribeMethods[$eventClass][0]->name,
61-
$method->getName()
62+
$method->getName(),
6263
);
6364
}
6465

src/Metadata/Subscriber/DuplicateSubscribeMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public static function duplicateEvent(
1414
string $subscriber,
1515
string $event,
1616
string $fistMethod,
17-
string $secondMethod
17+
string $secondMethod,
1818
): self {
1919
return new self(
2020
sprintf(
2121
'Two methods "%s" and "%s" on the subscriber "%s" are subscribing the event "%s". A subscriber can only listen once to a event, thus this is not allowed.',
2222
$fistMethod,
2323
$secondMethod,
2424
$subscriber,
25-
$event
25+
$event,
2626
),
2727
);
2828
}

tests/Unit/Metadata/Subscriber/AttributeSubscriberMetadataFactoryTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ class {
264264
public function profileVisited(ProfileVisited $event): void
265265
{
266266
}
267+
267268
#[Subscribe(Subscribe::ALL)]
268269
public function listenAll(ProfileVisited $event): void
269270
{
@@ -284,6 +285,7 @@ class {
284285
public function profileVisited(ProfileVisited $event): void
285286
{
286287
}
288+
287289
#[Subscribe(ProfileVisited::class)]
288290
public function profileVisitedAgain(ProfileVisited $event): void
289291
{

tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\MessageArgumentResolver;
1616
use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessor;
1717
use Patchlevel\EventSourcing\Subscription\Subscriber\NoSuitableResolver;
18-
use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated;
1918
use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId;
2019
use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited;
2120
use PHPUnit\Framework\TestCase;

0 commit comments

Comments
 (0)