Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jul 12, 2024
1 parent 03648c8 commit 68f07f5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions monorepo/DevTools/src/RefactorConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

namespace Hyde\MonorepoDevTools;

use Enum;
use UnitEnum;
use Hyde\Hyde;
use BackedEnum;
use Hyde\Enums\Feature;
use Illuminate\Support\Str;
use Symfony\Component\Yaml\Yaml;
Expand All @@ -19,7 +16,6 @@
use function config;
use function substr;
use function collect;
use function gettype;
use function implode;
use function in_array;
use function is_array;
Expand All @@ -44,12 +40,13 @@ class RefactorConfigCommand extends Command
public function handle(): int
{
$format = $this->argument('format');
if (!in_array($format, self::FORMATS)) {
$this->error('Invalid format. Supported formats: ' . implode(', ', self::FORMATS));
if (! in_array($format, self::FORMATS)) {
$this->error('Invalid format. Supported formats: '.implode(', ', self::FORMATS));

return 1;
}

$this->gray(' > Migrating configuration to ' . $format);
$this->gray(' > Migrating configuration to '.$format);

match ($format) {
'yaml' => $this->migrateToYaml(),
Expand All @@ -62,7 +59,7 @@ public function handle(): int

protected function migrateToYaml(): void
{
if (file_exists(Hyde::path('hyde.yml')) && !file_exists(Hyde::path('hyde.yml.bak'))) {
if (file_exists(Hyde::path('hyde.yml')) && ! file_exists(Hyde::path('hyde.yml.bak'))) {
copy(Hyde::path('hyde.yml'), Hyde::path('hyde.yml.bak'));
}

Expand Down

0 comments on commit 68f07f5

Please sign in to comment.