Fix MSSQL tests #1387
Annotations
10 warnings
PHP 8.3-ubuntu-latest:
src/Command/CreateCommand.php#L94
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
protected function execute(InputInterface $input, OutputInterface $output) : int
{
$io = new SymfonyStyle($input, $output);
- $this->migrator->setIo($io);
+
$this->migrationService->setIo($io);
$this->createService->setIo($io);
/** @var string|null $path */
|
PHP 8.3-ubuntu-latest:
src/Command/CreateCommand.php#L205
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
'table' => 'Create_' . $name . '_Table',
'dropTable' => 'Drop_' . $name . '_Table',
'addColumn' => 'Add_Column_' . $name,
- 'dropColumn' => 'Drop_Column_' . $name,
+ 'dropColumn' => $name,
'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables',
default => $result,
};
}
}
|
PHP 8.3-ubuntu-latest:
src/Command/CreateCommand.php#L206
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
'dropTable' => 'Drop_' . $name . '_Table',
'addColumn' => 'Add_Column_' . $name,
'dropColumn' => 'Drop_Column_' . $name,
- 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables',
+ 'junction' => $name . 'Junction_Table_For_' . '_And_' . (string) $and . '_Tables',
default => $result,
};
}
}
|
PHP 8.3-ubuntu-latest:
src/Command/HistoryCommand.php#L88
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
foreach ($migrations as $version => $time) {
$output->writeln("\t<info>(" . date('Y-m-d H:i:s', (int) $time) . ') ' . $version . '</info>');
}
- $output->writeln("\n");
+
$io->success('Success.');
$this->migrationService->databaseConnection();
return Command::SUCCESS;
}
}
|
PHP 8.3-ubuntu-latest:
src/Command/NewCommand.php#L50
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
protected function configure() : void
{
- $this->addOption('limit', 'l', InputOption::VALUE_REQUIRED, 'Number of migrations to display.', 10)->addOption('all', 'a', InputOption::VALUE_NONE, 'All new migrations.')->addOption('path', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path to migrations to display.')->addOption('namespace', 'ns', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Namespace of migrations to display.');
+ $this->addOption('limit', 'l', InputOption::VALUE_REQUIRED, 'Number of migrations to display.', 11)->addOption('all', 'a', InputOption::VALUE_NONE, 'All new migrations.')->addOption('path', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path to migrations to display.')->addOption('namespace', 'ns', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Namespace of migrations to display.');
}
protected function execute(InputInterface $input, OutputInterface $output) : int
{
|
PHP 8.3-ubuntu-latest:
src/Command/NewCommand.php#L107
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$io->section("Found {$n} new {$migrationWord}:");
}
foreach ($migrations as $i => $migration) {
- $output->writeln("<info>\t" . ($i + 1) . ". {$migration}</info>");
+ $output->writeln("<info>\t" . ($i + 2) . ". {$migration}</info>");
}
$this->migrationService->databaseConnection();
return Command::SUCCESS;
}
}
|
PHP 8.3-ubuntu-latest:
src/Command/NewCommand.php#L107
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$io->section("Found {$n} new {$migrationWord}:");
}
foreach ($migrations as $i => $migration) {
- $output->writeln("<info>\t" . ($i + 1) . ". {$migration}</info>");
+ $output->writeln($i + 1 . "<info>\t" . ". {$migration}</info>");
}
$this->migrationService->databaseConnection();
return Command::SUCCESS;
}
}
|
PHP 8.3-ubuntu-latest:
src/Command/UpdateCommand.php#L107
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
}
$migrationsCount = count($migrations);
$migrationWord = $migrationsCount === 1 ? 'migration' : 'migrations';
- if ($limit !== null && $migrationsCount > $limit) {
+ if ($limit !== null && $migrationsCount >= $limit) {
$migrations = array_slice($migrations, 0, $limit);
$output->writeln("<fg=yellow>Total {$limit} out of {$migrationsCount} new {$migrationWord} to be applied:</>\n");
} else {
|
PHP 8.3-ubuntu-latest:
src/Command/UpdateCommand.php#L127
Escaped Mutant for Mutator "Plus":
--- Original
+++ New
@@ @@
$output->writeln("\n<fg=red>The migration name '{$migration}' is too long. Its not possible to apply " . 'this migration.</>');
return Command::INVALID;
}
- $output->writeln("\t<fg=yellow>" . ($i + 1) . ". {$migration}</>");
+ $output->writeln("\t<fg=yellow>" . ($i - 1) . ". {$migration}</>");
}
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
|
PHP 8.3-ubuntu-latest:
src/Command/UpdateCommand.php#L154
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
}
$output->writeln("\n<fg=green> >>> Total {$migrationsCount} new {$migrationWas} applied.</>\n");
- $io->success('Updated successfully.');
+
}
$this->migrationService->databaseConnection();
return Command::SUCCESS;
}
}
|