Skip to content

Commit e9442d1

Browse files
nikophilkbond
authored andcommitted
bot: fix cs [skip ci]
1 parent fd59e32 commit e9442d1

18 files changed

+41
-45
lines changed

src/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Zenstruck\Foundry\InMemory\InMemoryRepositoryRegistry;
2121
use Zenstruck\Foundry\Persistence\PersistedObjectsTracker;
2222
use Zenstruck\Foundry\Persistence\PersistenceManager;
23+
2324
/**
2425
* @author Kevin Bond <kevinbond@gmail.com>
2526
*

src/PHPUnit/FoundryExtension.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,34 @@ public function bootstrap(
4747
&& 'true' === $parameters->get(self::PARAMETER_AUTO_RESET_DATABASE_CLASS);
4848

4949
// ⚠️ order matters within each event
50-
$subscribers = [
51-
Event\TestSuite\Started::class => [new ResetDatabaseOnTestSuiteStarted($autoResetEnabled)],
52-
Event\Test\DataProviderMethodCalled::class => [new BootFoundryOnDataProviderMethodCalled()],
53-
Event\Test\DataProviderMethodFinished::class => [new ShutdownFoundryOnDataProviderMethodFinished()],
54-
Event\Test\PreparationStarted::class => [
55-
new BootFoundryOnPreparationStarted(),
56-
new ResetDatabaseOnPreparationStarted($autoResetEnabled),
57-
new EnableInMemoryOnPreparationStarted(),
58-
],
59-
Event\Test\Prepared::class => [
60-
new BuildStoryOnTestPrepared(),
61-
new TriggerDataProviderPersistenceOnTestPrepared(),
62-
],
63-
Event\Test\Finished::class => [new ShutdownFoundryOnTestFinished()],
64-
Event\TestRunner\Finished::class => [new DisplayFakerSeedOnApplicationFinished()],
65-
];
50+
$subscribers = [
51+
Event\TestSuite\Started::class => [new ResetDatabaseOnTestSuiteStarted($autoResetEnabled)],
52+
Event\Test\DataProviderMethodCalled::class => [new BootFoundryOnDataProviderMethodCalled()],
53+
Event\Test\DataProviderMethodFinished::class => [new ShutdownFoundryOnDataProviderMethodFinished()],
54+
Event\Test\PreparationStarted::class => [
55+
new BootFoundryOnPreparationStarted(),
56+
new ResetDatabaseOnPreparationStarted($autoResetEnabled),
57+
new EnableInMemoryOnPreparationStarted(),
58+
],
59+
Event\Test\Prepared::class => [
60+
new BuildStoryOnTestPrepared(),
61+
new TriggerDataProviderPersistenceOnTestPrepared(),
62+
],
63+
Event\Test\Finished::class => [new ShutdownFoundryOnTestFinished()],
64+
Event\TestRunner\Finished::class => [new DisplayFakerSeedOnApplicationFinished()],
65+
];
6666

67-
$subscribers = \array_merge(...\array_values($subscribers));
67+
$subscribers = \array_merge(...\array_values($subscribers));
6868

69-
// Foundry can only handle data provider since PHPUnit 11.4
70-
if (!ConstraintRequirement::from('>=11.4')->isSatisfiedBy(Runner\Version::id())) {
71-
$subscribers = \array_filter(
72-
$subscribers,
73-
static fn($subscriber) => !$subscriber instanceof DataProviderSubscriberInterface
74-
);
75-
}
69+
// Foundry can only handle data provider since PHPUnit 11.4
70+
if (!ConstraintRequirement::from('>=11.4')->isSatisfiedBy(Runner\Version::id())) {
71+
$subscribers = \array_filter(
72+
$subscribers,
73+
static fn($subscriber) => !$subscriber instanceof DataProviderSubscriberInterface
74+
);
75+
}
7676

77-
$facade->registerSubscribers(...$subscribers);
77+
$facade->registerSubscribers(...$subscribers);
7878

7979
self::$enabled = true;
8080
}

tests/Integration/Faker/FakerCustomServiceKernelTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#[ResetDatabase]
2929
final class FakerCustomServiceKernelTest extends KernelTestCase
3030
{
31-
3231
#[Test]
3332
public function faker_service_can_be_set(): void
3433
{

tests/Integration/Faker/FakerSeedAutomaticallySetKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use PHPUnit\Framework\Attributes\RequiresPhpunit;
1616
use PHPUnit\Framework\Attributes\Test;
1717
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
18-
use Zenstruck\Foundry\FakerAdapter;
1918
use Zenstruck\Foundry\Attribute\ResetDatabase;
19+
use Zenstruck\Foundry\FakerAdapter;
2020

2121
use function Zenstruck\Foundry\faker;
2222

tests/Integration/Faker/FakerSeedIsNotResetDuringRunKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use PHPUnit\Framework\Attributes\RequiresPhpunit;
1515
use PHPUnit\Framework\Attributes\Test;
1616
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
17-
use Zenstruck\Foundry\FakerAdapter;
1817
use Zenstruck\Foundry\Attribute\ResetDatabase;
18+
use Zenstruck\Foundry\FakerAdapter;
1919
use Zenstruck\Foundry\Tests\Fixture\Factories\Entity\WithUniqueColumn\WithUniqueColumnFactory;
2020
use Zenstruck\Foundry\Tests\Integration\RequiresORM;
2121

tests/Integration/Faker/FakerSeedSetFromEnvVarKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
use PHPUnit\Framework\Attributes\Test;
1717
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1818
use Symfony\Component\HttpKernel\KernelInterface;
19-
use Zenstruck\Foundry\FakerAdapter;
2019
use Zenstruck\Foundry\Attribute\ResetDatabase;
20+
use Zenstruck\Foundry\FakerAdapter;
2121

2222
use function Zenstruck\Foundry\faker;
2323

tests/Integration/Faker/FakerSeedSetFromLegacyConfigKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
use PHPUnit\Framework\Attributes\Test;
1818
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1919
use Symfony\Component\HttpKernel\KernelInterface;
20-
use Zenstruck\Foundry\FakerAdapter;
2120
use Zenstruck\Foundry\Attribute\ResetDatabase;
21+
use Zenstruck\Foundry\FakerAdapter;
2222

2323
use function Zenstruck\Foundry\faker;
2424

tests/Integration/Faker/FakerSeedShouldNotChangeIfSeedIsNotManagedByFoundryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
use PHPUnit\Framework\Attributes\WithEnvironmentVariable;
1818
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1919
use Symfony\Component\HttpKernel\KernelInterface;
20-
use Zenstruck\Foundry\FakerAdapter;
2120
use Zenstruck\Foundry\Attribute\ResetDatabase;
21+
use Zenstruck\Foundry\FakerAdapter;
2222

2323
use function Zenstruck\Foundry\faker;
2424

tests/Integration/ORM/EdgeCasesRelationshipTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
use PHPUnit\Framework\Attributes\RequiresPhpunit;
1818
use PHPUnit\Framework\Attributes\Test;
1919
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
20-
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
2120
use Zenstruck\Foundry\Attribute\ResetDatabase;
21+
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
2222
use Zenstruck\Foundry\Tests\Fixture\DoctrineCascadeRelationship\ChangesEntityRelationshipCascadePersist;
2323
use Zenstruck\Foundry\Tests\Fixture\DoctrineCascadeRelationship\UsingRelationships;
2424
use Zenstruck\Foundry\Tests\Fixture\Entity\EdgeCases\EntityWithLifecycleCallback;

tests/Integration/ORM/EntityRelationship/EntityFactoryRelationshipTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
use PHPUnit\Framework\Attributes\RequiresPhpunit;
1818
use PHPUnit\Framework\Attributes\Test;
1919
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
20+
use Zenstruck\Foundry\Attribute\ResetDatabase;
2021
use Zenstruck\Foundry\Factory;
2122
use Zenstruck\Foundry\FactoryCollection;
2223
use Zenstruck\Foundry\Object\Instantiator;
2324
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
24-
use Zenstruck\Foundry\Attribute\ResetDatabase;
2525
use Zenstruck\Foundry\Tests\Fixture\DoctrineCascadeRelationship\ChangesEntityRelationshipCascadePersist;
2626
use Zenstruck\Foundry\Tests\Fixture\DoctrineCascadeRelationship\UsingRelationships;
2727
use Zenstruck\Foundry\Tests\Fixture\Entity\Address;

0 commit comments

Comments
 (0)