Skip to content

Commit b4c34d3

Browse files
Fix styling
1 parent 88ad63b commit b4c34d3

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

packages/core/config/moox-installer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
// 'require_confirmation' => true,
4141
// ],
4242

43-
4443
'plugins' => [
4544
'enabled' => true,
4645
'priority' => 100,

packages/core/src/Installer/AbstractAssetInstaller.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
namespace Moox\Core\Installer;
44

55
use Illuminate\Console\Command;
6-
use Illuminate\Support\Facades\Artisan;
76
use Illuminate\Support\Facades\File;
87
use Moox\Core\Installer\Contracts\AssetInstallerInterface;
98
use Symfony\Component\Console\Input\StringInput;
109

1110
use function Moox\Prompts\multiselect;
12-
use function Moox\Prompts\note;
1311

1412
/**
1513
* Abstract base class for asset installers.
@@ -278,7 +276,7 @@ protected function publishPackageAssets(string $packageName, string $type, ?stri
278276
'--tag' => $tag,
279277
'--force' => $this->config['force'] ?? false,
280278
]);
281-
279+
282280
// Bei $this->command->call() gibt es keine separate output() Methode
283281
// Die Ausgabe wird direkt angezeigt
284282
if ($result === 0) {
@@ -291,12 +289,12 @@ protected function publishPackageAssets(string $packageName, string $type, ?stri
291289
if ($this->config['force'] ?? false) {
292290
$commandString .= ' --force';
293291
}
294-
292+
295293
$input = new StringInput($commandString);
296294
// Wichtig: Als interaktiv markieren, damit Prompts funktionieren
297295
$input->setInteractive(true);
298296
$result = app()->handleCommand($input);
299-
297+
300298
if ($result === 0) {
301299
$published = true;
302300
break;

packages/core/src/Installer/Installers/MigrationInstaller.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Moox\Core\Installer\Installers;
44

5-
use Illuminate\Support\Facades\Artisan;
65
use Illuminate\Support\Facades\File;
76
use Moox\Core\Installer\AbstractAssetInstaller;
87
use Symfony\Component\Console\Input\StringInput;
@@ -145,7 +144,7 @@ protected function runMigrations(): void
145144
{
146145
try {
147146
info('🔄 Running migrations...');
148-
147+
149148
// Verwende $this->command->call() wenn verfügbar (nach Prompts funktioniert das besser)
150149
// Das nutzt den korrekten IO-Context vom Command
151150
if ($this->command) {
@@ -157,7 +156,7 @@ protected function runMigrations(): void
157156
$input->setInteractive(true);
158157
app()->handleCommand($input);
159158
}
160-
159+
161160
info('✅ Migrations executed successfully');
162161
} catch (\Exception $e) {
163162
warning("⚠️ Migration error: {$e->getMessage()}");

packages/core/src/Installer/Installers/PluginInstaller.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22

33
namespace Moox\Core\Installer\Installers;
44

5+
use Filament\Support\Commands\Concerns\CanGeneratePanels;
6+
use Filament\Support\Commands\Concerns\CanManipulateFiles;
7+
use Illuminate\Support\Facades\File;
8+
use Moox\Core\Installer\AbstractAssetInstaller;
9+
use Moox\Core\Installer\Contracts\PanelAwareInstallerInterface;
10+
use Symfony\Component\Console\Input\StringInput;
11+
12+
use function Moox\Prompts\confirm;
513
use function Moox\Prompts\info;
14+
use function Moox\Prompts\multiselect;
615
use function Moox\Prompts\note;
7-
use function Moox\Prompts\text;
816
use function Moox\Prompts\select;
9-
use function Moox\Prompts\confirm;
10-
17+
use function Moox\Prompts\text;
1118
use function Moox\Prompts\warning;
12-
use Illuminate\Support\Facades\File;
13-
use function Moox\Prompts\multiselect;
14-
use Illuminate\Support\Facades\Artisan;
15-
use Moox\Core\Installer\AbstractAssetInstaller;
16-
use Symfony\Component\Console\Input\StringInput;
17-
use Filament\Support\Commands\Concerns\CanGeneratePanels;
18-
use Filament\Support\Commands\Concerns\CanManipulateFiles;
19-
use Moox\Core\Installer\Contracts\PanelAwareInstallerInterface;
2019

2120
/**
2221
* Installer for Filament plugins.
@@ -268,9 +267,10 @@ protected function createNewPanel(): ?string
268267

269268
// Sanitize panel name - only allow alphanumeric and hyphens
270269
$panelName = preg_replace('/[^a-zA-Z0-9-]/', '', $panelName);
271-
270+
272271
if (empty($panelName)) {
273272
warning('Invalid panel name');
273+
274274
return null;
275275
}
276276

@@ -297,7 +297,7 @@ protected function createNewPanel(): ?string
297297
if (File::exists($expectedPath)) {
298298
$commandString .= ' --force';
299299
}
300-
300+
301301
$input = new StringInput($commandString);
302302
// Wichtig: Als interaktiv markieren, damit Prompts funktionieren
303303
$input->setInteractive(true);
@@ -306,19 +306,23 @@ protected function createNewPanel(): ?string
306306

307307
if ($exitCode !== 0) {
308308
warning("⚠️ Panel konnte nicht erstellt werden (Exit Code: {$exitCode})");
309+
309310
return null;
310311
}
311312

312313
// Prüfen ob die Datei erstellt wurde
313314
if (File::exists($expectedPath)) {
314315
note("✅ Panel created: {$panelName}");
316+
315317
return $expectedPath;
316318
}
317319

318320
warning('Panel creation may have failed - file not found');
321+
319322
return null;
320323
} catch (\Throwable $e) {
321324
warning("Could not create panel: {$e->getMessage()}");
325+
322326
return null;
323327
}
324328
}

packages/core/src/Installer/Installers/SeederInstaller.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Moox\Core\Installer\Installers;
44

5-
use Illuminate\Support\Facades\Artisan;
65
use Moox\Core\Installer\AbstractAssetInstaller;
76
use Symfony\Component\Console\Input\StringInput;
87

packages/core/src/Installer/Traits/HasInstallationHooks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ protected function runWithHooks(InstallerRegistry $registry, array $assets, arra
101101
}
102102

103103
$this->beforeInstaller($type);
104-
104+
105105
// Setze das Command-Objekt, damit Installer $this->command->call() verwenden können
106106
// Das ist wichtig, damit der IO-Context nach Prompts korrekt funktioniert
107107
if (method_exists($installer, 'setCommand')) {
108108
$installer->setCommand($this);
109109
}
110-
110+
111111
$installer->install($typeAssets);
112112
$this->afterInstaller($type);
113113
} catch (\Exception $e) {

0 commit comments

Comments
 (0)