diff --git a/src/Laravel/Commands/MakeResourceCommand.php b/src/Laravel/Commands/MakeResourceCommand.php index c0df23285..09a8cf8e8 100644 --- a/src/Laravel/Commands/MakeResourceCommand.php +++ b/src/Laravel/Commands/MakeResourceCommand.php @@ -6,7 +6,7 @@ use Illuminate\Contracts\Filesystem\FileNotFoundException; -use function Laravel\Prompts\{info, outro, select, text}; +use function Laravel\Prompts\{info, select, text}; use Symfony\Component\Console\Attribute\AsCommand; diff --git a/src/Laravel/Commands/MoonShineCommand.php b/src/Laravel/Commands/MoonShineCommand.php index 351318d59..ec22e5fc6 100644 --- a/src/Laravel/Commands/MoonShineCommand.php +++ b/src/Laravel/Commands/MoonShineCommand.php @@ -50,16 +50,16 @@ private static function addResourceOrPageTo(string $class, string $append, strin $content = str(file_get_contents($to)); - if($content->contains($class)) { + if ($content->contains($class)) { return; } - $tab = static fn(int $times = 1): string => str_repeat(' ', $times * 4); + $tab = static fn (int $times = 1): string => str_repeat(' ', $times * 4); $headSection = $content->before('class '); $resourcesSection = $content->betweenFirst("protected function $method(): array", '}'); - if($content->contains($use)) { + if ($content->contains($use)) { $use = ''; } @@ -70,7 +70,7 @@ private static function addResourceOrPageTo(string $class, string $append, strin ], [ $headSection->replaceLast(';', (";\nuse $namespace;" . ($use ? "\nuse $use;" : ''))), - $resourcesSection->replace("];", "{$tab()}$append,\n{$tab(2)}];")->value() + $resourcesSection->replace("];", "{$tab()}$append,\n{$tab(2)}];")->value(), ], $content->value() );