Skip to content

Commit

Permalink
bot: fix cs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikophil authored and kbond committed Jan 23, 2025
1 parent 9937b11 commit a186c96
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ZenstruckFoundryBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function loadExtension(array $config, ContainerConfigurator $configurator
}
);

if ($resetMode === ResetDatabaseMode::MIGRATE) {
if (ResetDatabaseMode::MIGRATE === $resetMode) {
$container->getDefinition(OrmResetter::class)
->replaceArgument('$configurations', $config['orm']['reset']['migrations']['configurations'])
;
Expand Down
11 changes: 10 additions & 1 deletion tests/Fixture/ResetDatabase/MongoResetterDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the zenstruck/foundry package.
*
* (c) Kevin Bond <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Zenstruck\Foundry\Tests\Fixture\ResetDatabase;

use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
Expand All @@ -14,7 +23,7 @@ final class MongoResetterDecorator implements MongoResetter
public static bool $calledBeforeEachTest = false;

public function __construct(
private MongoResetter $decorated
private MongoResetter $decorated,
) {
}

Expand Down
14 changes: 12 additions & 2 deletions tests/Fixture/ResetDatabase/OrmResetterDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the zenstruck/foundry package.
*
* (c) Kevin Bond <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Zenstruck\Foundry\Tests\Fixture\ResetDatabase;

use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
Expand All @@ -15,8 +24,9 @@ final class OrmResetterDecorator implements OrmResetter
public static bool $calledBeforeEachTest = false;

public function __construct(
private OrmResetter $decorated
) {}
private OrmResetter $decorated,
) {
}

public function resetBeforeFirstTest(KernelInterface $kernel): void
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/ResetDatabase/ResetDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Zenstruck\Foundry\Tests\Fixture\EntityInAnotherSchema\Article;
use Zenstruck\Foundry\Persistence\PersistenceManager;
use Zenstruck\Foundry\Tests\Fixture\EntityInAnotherSchema\Article;
use Zenstruck\Foundry\Tests\Fixture\Factories\Document\GenericDocumentFactory;
use Zenstruck\Foundry\Tests\Fixture\ResetDatabase\MongoResetterDecorator;
use Zenstruck\Foundry\Tests\Fixture\ResetDatabase\OrmResetterDecorator;
use Zenstruck\Foundry\Tests\Fixture\Factories\Entity\GenericEntityFactory;
use Zenstruck\Foundry\Tests\Fixture\FoundryTestKernel;
use Zenstruck\Foundry\Tests\Fixture\ResetDatabase\MongoResetterDecorator;
use Zenstruck\Foundry\Tests\Fixture\ResetDatabase\OrmResetterDecorator;

use function Zenstruck\Foundry\Persistence\persist;
use function Zenstruck\Foundry\Persistence\repository;
Expand Down

0 comments on commit a186c96

Please sign in to comment.