Skip to content

Commit a41c007

Browse files
kargnasgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 241baaa commit a41c007

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Console/Commands/MigrateToolsCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public function handle()
6565
$potentialCandidates++;
6666

6767
// Ask about backup creation only once
68-
if ($createBackups === null && !$this->option('no-backup')) {
68+
if ($createBackups === null && ! $this->option('no-backup')) {
6969
$createBackups = $this->confirm(
7070
'Do you want to create backup files before migration? (Recommended)',
7171
true // Default to yes
7272
);
73-
73+
7474
if ($createBackups) {
7575
$this->info('Backup files will be created with .backup extension.');
7676
} else {
@@ -85,6 +85,7 @@ public function handle()
8585
// Check if backup already exists when backups are enabled
8686
if ($createBackups && File::exists($backupFilePath)) {
8787
$this->warn("Backup for '{$filePath}' already exists at '{$backupFilePath}'. Skipping migration for this file.");
88+
8889
continue; // Skip to the next file
8990
}
9091

@@ -95,6 +96,7 @@ public function handle()
9596
$this->info("Backed up '{$filePath}' to '{$backupFilePath}'.");
9697
} else {
9798
$this->error("Failed to create backup for '{$filePath}'. Skipping migration for this file.");
99+
98100
continue;
99101
}
100102
}
@@ -110,14 +112,15 @@ public function handle()
110112
if (File::put($filePath, $modifiedContent)) {
111113
$this->info("Successfully migrated '{$filePath}'.");
112114
} else {
113-
$this->error("Failed to write changes to '{$filePath}'." . ($createBackups ? " You can restore from backup if needed." : ""));
115+
$this->error("Failed to write changes to '{$filePath}'.".($createBackups ? ' You can restore from backup if needed.' : ''));
114116
}
115117
} else {
116118
$this->info("No changes were necessary for '{$filePath}' during migration content generation (this might indicate an issue or already migrated parts).");
117119
}
118120

119121
} catch (\Exception $e) {
120122
$this->error("Error migrating '{$filePath}': ".$e->getMessage().'. Skipping migration for this file.');
123+
121124
continue;
122125
}
123126

0 commit comments

Comments
 (0)