44
55use Illuminate \Console \Command ;
66use Illuminate \Filesystem \Filesystem ;
7- use function Termwind \render ;
87
98class Configure extends Command
109{
@@ -14,7 +13,7 @@ class Configure extends Command
1413
1514 public function handle (): void
1615 {
17- $ filesystem = new Filesystem () ;
16+ $ filesystem = new Filesystem ;
1817
1918 $ configs = [
2019 'rector.php ' ,
@@ -23,18 +22,20 @@ public function handle(): void
2322 ];
2423
2524 foreach ($ configs as $ file ) {
26- $ sourceFile = __DIR__ . "/../../config/laravel/ {$ file }" ;
25+ $ sourceFile = __DIR__ . "/../../config/laravel/ {$ file }" ;
2726 $ destinationFile = base_path ($ file );
2827
29- if (!$ filesystem ->exists ($ sourceFile )) {
28+ if (! $ filesystem ->exists ($ sourceFile )) {
3029 $ this ->error ("Source file not found: {$ sourceFile }" );
30+
3131 continue ;
3232 }
3333
3434 if ($ filesystem ->exists ($ destinationFile )) {
3535 $ overwrite = $ this ->confirmOverwrite ($ destinationFile );
36- if (!$ overwrite ) {
36+ if (! $ overwrite ) {
3737 $ this ->warn ("Skipped: {$ destinationFile } already exists " );
38+
3839 continue ;
3940 }
4041 }
@@ -45,12 +46,12 @@ public function handle(): void
4546 }
4647 }
4748
48- private function confirmOverwrite (string $ file ): bool
49+ private function confirmOverwrite (string $ file ): mixed
4950 {
5051 $ this ->info (
5152 sprintf ('%s already exists. Do you want to overwrite it? ' , $ file )
5253 );
5354
54- return $ this ->ask ('Overwrite? ' , false );
55+ return $ this ->ask ('Overwrite? ' );
5556 }
5657}
0 commit comments