diff --git a/src/laravel/Commands/SetupCommand.php b/src/laravel/Commands/SetupCommand.php index ca09702..59f998b 100644 --- a/src/laravel/Commands/SetupCommand.php +++ b/src/laravel/Commands/SetupCommand.php @@ -16,7 +16,7 @@ class SetupCommand extends Command public function handle(): void { // TODO: non Laravel command - Xssless::usingLaravelConfig()->setup() ? + Xssless::setup() ? $this->info('Setup done.') : $this->info('The current driver has no setup.'); } diff --git a/src/laravel/Commands/StartCommand.php b/src/laravel/Commands/StartCommand.php index 72a8444..d5e1dc3 100644 --- a/src/laravel/Commands/StartCommand.php +++ b/src/laravel/Commands/StartCommand.php @@ -16,7 +16,7 @@ class StartCommand extends Command public function handle(): void { // TODO: non Laravel command - $service = Xssless::usingLaravelConfig()->start(); + $service = Xssless::start(); if (is_null($service)) { $this->info('The current driver is not a service to start.'); diff --git a/src/laravel/config/xssless.php b/src/laravel/config/xssless.php index 6515a3a..67a34f1 100644 --- a/src/laravel/config/xssless.php +++ b/src/laravel/config/xssless.php @@ -1,20 +1,17 @@ 'dompurify-cli', 'drivers' => [ - 'dompurify-cli' => new DompurifyCliConfig( + 'dompurify-cli' => new \Medilies\Xssless\Dompurify\DompurifyCliConfig( node: env('NODE_PATH', 'node'), // @phpstan-ignore argument.type npm: env('NPM_PATH', 'npm'), // @phpstan-ignore argument.type binary: null, tempFolder: null, ), - 'dompurify-service' => new DompurifyServiceConfig( + 'dompurify-service' => new \Medilies\Xssless\Dompurify\DompurifyServiceConfig( node: env('NODE_PATH', 'node'), // @phpstan-ignore argument.type npm: env('NPM_PATH', 'npm'), // @phpstan-ignore argument.type host: '127.0.0.1', @@ -23,3 +20,5 @@ ), ], ]; + +// TODO: check classes exist diff --git a/tests/ArchTest.php b/tests/architecture/ArchTest.php similarity index 100% rename from tests/ArchTest.php rename to tests/architecture/ArchTest.php