Skip to content

Commit 2c85877

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 8f91a31 + 42faff5 commit 2c85877

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/Commands/ClearCacheCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function configure()
2020
$this->addOption('all', null, InputOption::VALUE_NONE, 'Clear all caches');
2121
foreach (static::CACHE_TYPES as $option => $description) {
2222
$this->addOption($option, null, InputOption::VALUE_NONE, "Clear {$description} cache");
23-
};
23+
}
2424
}
2525

2626
public function handle(): int

src/Commands/InstallCommand.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use SolutionForest\InspireCms\Licensing\LicenseManager;
1111
use Symfony\Component\Console\Attribute\AsCommand;
1212

13-
1413
#[AsCommand(name: 'inspirecms:install')]
1514
class InstallCommand extends Command
1615
{
@@ -28,6 +27,7 @@ public function handle()
2827
));
2928
if (! $license) {
3029
$this->error('License key is required. Installation aborted.');
30+
3131
return static::FAILURE;
3232
}
3333

@@ -37,7 +37,7 @@ public function handle()
3737
// 2) Publish config
3838
if ($this->confirm('Do you want to publish the configuration files?', false)) {
3939
$this->call('vendor:publish', [
40-
'--tag' => InspireCms::CORE_SLUG . '-config',
40+
'--tag' => InspireCms::CORE_SLUG . '-config',
4141
]);
4242
$this->info('Configuration files published.');
4343
} else {
@@ -47,7 +47,7 @@ public function handle()
4747
// 3) Publish migrations
4848
if ($this->confirm('Do you want to publish the migrations?', true)) {
4949
$this->call('vendor:publish', [
50-
'--tag' => InspireCms::CORE_SLUG . '-migrations',
50+
'--tag' => InspireCms::CORE_SLUG . '-migrations',
5151
]);
5252
$this->info('Migrations published.');
5353
} else {
@@ -75,6 +75,7 @@ public function handle()
7575
$this->call(ImportDefaultDataCommand::class);
7676

7777
$this->info('InspireCMS installation complete!');
78+
7879
return static::SUCCESS;
7980
}
8081

@@ -96,9 +97,10 @@ private function appendLicenseToEnv($license)
9697
throw new RuntimeException('Failed to update license in .env');
9798
}
9899
$this->info('License key saved.');
100+
99101
return;
100102
}
101-
103+
102104
// If not, append it
103105
if (file_put_contents($envPath, $entry, FILE_APPEND | LOCK_EX) === false) {
104106
throw new RuntimeException('Failed to append license to .env');
@@ -108,7 +110,7 @@ private function appendLicenseToEnv($license)
108110
if (! is_readable($envPath)) {
109111
chmod($envPath, 0644);
110112
}
111-
113+
112114
$this->info('License key saved.');
113115
}
114116
}

src/Commands/UpdateCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public function handle()
1919
// 1) Publish config
2020
if ($this->confirm('Do you want to publish the configuration files?', true)) {
2121
$this->call('vendor:publish', [
22-
'--tag' => InspireCms::CORE_SLUG . '-config',
23-
'--force' => true, // Force overwrite existing files
22+
'--tag' => InspireCms::CORE_SLUG . '-config',
23+
'--force' => true, // Force overwrite existing files
2424
]);
2525
$this->info('Configuration files published.');
2626
} else {
@@ -30,7 +30,7 @@ public function handle()
3030
// 2) Publish migrations
3131
if ($this->confirm('Do you want to publish the migrations?', true)) {
3232
$this->call('vendor:publish', [
33-
'--tag' => InspireCms::CORE_SLUG . '-migrations',
33+
'--tag' => InspireCms::CORE_SLUG . '-migrations',
3434
]);
3535
$this->info('Migrations published.');
3636
} else {

0 commit comments

Comments
 (0)