From 94bb945ff7416faf13eb4bb6001a757d87913774 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 11 Mar 2024 23:57:48 +0100 Subject: [PATCH] Fix CS --- src/DependencyFactory.php | 6 +++--- src/Tools/Console/Command/DoctrineCommand.php | 2 ++ src/Version/SortedMigrationPlanCalculator.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/DependencyFactory.php b/src/DependencyFactory.php index e30ebb891..fece1f5c7 100644 --- a/src/DependencyFactory.php +++ b/src/DependencyFactory.php @@ -145,7 +145,7 @@ public function getConfiguration(): Configuration { if ($this->configuration === null) { $this->configuration = $this->configurationLoader->getConfiguration(); - $this->frozen = true; + $this->frozen = true; } return $this->configuration; @@ -157,7 +157,7 @@ public function getConnection(): Connection $this->connection = $this->hasEntityManager() ? $this->getEntityManager()->getConnection() : $this->connectionLoader->getConnection($this->getConfiguration()->getConnectionName()); - $this->frozen = true; + $this->frozen = true; } return $this->connection; @@ -170,7 +170,7 @@ public function getEntityManager(): EntityManagerInterface throw MissingDependency::noEntityManager(); } - $this->em = $this->emLoader->getEntityManager($this->getConfiguration()->getEntityManagerName()); + $this->em = $this->emLoader->getEntityManager($this->getConfiguration()->getEntityManagerName()); $this->frozen = true; } diff --git a/src/Tools/Console/Command/DoctrineCommand.php b/src/Tools/Console/Command/DoctrineCommand.php index 01f90b140..cc908ec88 100644 --- a/src/Tools/Console/Command/DoctrineCommand.php +++ b/src/Tools/Console/Command/DoctrineCommand.php @@ -18,6 +18,7 @@ use Symfony\Component\Console\Style\StyleInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function assert; use function is_string; /** @@ -88,6 +89,7 @@ protected function initialize(InputInterface $input, OutputInterface $output): v $configurationLoader = new ConfigurationFileWithFallback($configurationParameter); $this->dependencyFactory->setConfigurationLoader($configurationLoader); } + $dependencyFactory = $this->dependencyFactory; $this->setNamedEmOrConnection($input); diff --git a/src/Version/SortedMigrationPlanCalculator.php b/src/Version/SortedMigrationPlanCalculator.php index f7f96a8c9..cf631b598 100644 --- a/src/Version/SortedMigrationPlanCalculator.php +++ b/src/Version/SortedMigrationPlanCalculator.php @@ -45,7 +45,7 @@ public function getPlanForVersions(array $versions, string $direction): Migratio $availableMigrations = array_filter( $migrationsToCheck, // in_array third parameter is intentionally false to force object to string casting - static fn (AvailableMigration $availableMigration): bool => in_array($availableMigration->getVersion(), $versions, false) + static fn (AvailableMigration $availableMigration): bool => in_array($availableMigration->getVersion(), $versions, false), ); $planItems = array_map(static fn (AvailableMigration $availableMigration): MigrationPlan => new MigrationPlan($availableMigration->getVersion(), $availableMigration->getMigration(), $direction), $availableMigrations);