Skip to content

Commit

Permalink
Fixes styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dgafka authored and github-actions[bot] committed Dec 12, 2022
1 parent 45ea297 commit 44bb8a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Ecotone\Messaging\Handler\ServiceActivator\ServiceActivatorBuilder;
use Ecotone\Messaging\MessageHandler;
use Ecotone\Messaging\Store\Document\InMemoryDocumentStore;
use Ecotone\Messaging\Support\Assert;

final class DbalDocumentStoreBuilder extends InputOutputMessageHandlerBuilder
{
Expand Down
20 changes: 8 additions & 12 deletions packages/Ecotone/src/Lite/EcotoneLite.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public static function bootstrap(
bool $useCachedVersion = false,
?string $pathToRootCatalog = null,
bool $allowGatewaysToBeRegisteredInContainer = false
): ConfiguredMessagingSystem
{
): ConfiguredMessagingSystem {
return self::prepareConfiguration($containerOrAvailableServices, $configuration, $classesToResolve, $configurationVariables, $pathToRootCatalog, false, $allowGatewaysToBeRegisteredInContainer, $useCachedVersion);
}

Expand All @@ -61,8 +60,7 @@ public static function bootstrapForTesting(
array $configurationVariables = [],
?string $pathToRootCatalog = null,
bool $allowGatewaysToBeRegisteredInContainer = false
): ConfiguredMessagingSystemWithTestSupport
{
): ConfiguredMessagingSystemWithTestSupport {
return self::prepareConfiguration($containerOrAvailableServices, $configuration, $classesToResolve, $configurationVariables, $pathToRootCatalog, true, $allowGatewaysToBeRegisteredInContainer, false);
}

Expand All @@ -83,8 +81,7 @@ public static function bootstrapFlowTesting(
bool $allowGatewaysToBeRegisteredInContainer = false,
bool $addInMemoryStateStoredRepository = true,
bool $addEventSourcedRepository = true,
): FlowTestSupport
{
): FlowTestSupport {
$configuration = self::prepareForFlowTesting($configuration, ModulePackageList::allPackages(), $classesToResolve, $addInMemoryStateStoredRepository);

if ($addEventSourcedRepository) {
Expand Down Expand Up @@ -112,18 +109,17 @@ public static function bootstrapFlowTestingWithEventStore(
?string $pathToRootCatalog = null,
bool $allowGatewaysToBeRegisteredInContainer = false,
bool $addInMemoryStateStoredRepository = true,
): FlowTestSupport
{
): FlowTestSupport {
$configuration = self::prepareForFlowTesting($configuration, ModulePackageList::allPackagesExcept([ModulePackageList::EVENT_SOURCING_PACKAGE, ModulePackageList::DBAL_PACKAGE, ModulePackageList::JMS_CONVERTER_PACKAGE]), $classesToResolve, $addInMemoryStateStoredRepository);

if (!$configuration->hasExtensionObject(BaseEventSourcingConfiguration::class)) {
Assert::isTrue(class_exists(EventSourcingConfiguration::class), "To use Flow Testing with Event Store you need to add event sourcing module.");
if (! $configuration->hasExtensionObject(BaseEventSourcingConfiguration::class)) {
Assert::isTrue(class_exists(EventSourcingConfiguration::class), 'To use Flow Testing with Event Store you need to add event sourcing module.');

$configuration = $configuration
->addExtensionObject(EventSourcingConfiguration::createInMemory());
}

if (!$configuration->hasExtensionObject(DbalConfiguration::class)) {
if (! $configuration->hasExtensionObject(DbalConfiguration::class)) {
$configuration = $configuration
->addExtensionObject(DbalConfiguration::createForTesting());
}
Expand Down Expand Up @@ -210,7 +206,7 @@ private static function prepareForFlowTesting(?ServiceConfiguration $configurati
$configuration = $configuration ?: ServiceConfiguration::createWithDefaults();
$testConfiguration = ExtensionObjectResolver::resolveUnique(TestConfiguration::class, $configuration->getExtensionObjects(), TestConfiguration::createWithDefaults());

if (!$configuration->areSkippedPackagesDefined()) {
if (! $configuration->areSkippedPackagesDefined()) {
$configuration = $configuration
->withSkippedModulePackageNames($packagesToSkip);
}
Expand Down
2 changes: 0 additions & 2 deletions packages/Ecotone/src/Lite/Test/FlowTestSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Ecotone\Lite\Test;

use App\Testing\Domain\ShoppingBasket\Basket;
use App\Testing\Domain\ShoppingBasket\Event\ProductWasAddedToBasket;
use Ecotone\EventSourcing\EventStore;
use Ecotone\EventSourcing\ProjectionManager;
use Ecotone\Messaging\Config\ConfiguredMessagingSystem;
Expand Down

0 comments on commit 44bb8a3

Please sign in to comment.