55namespace KaririCode \Devkit \Command ;
66
77use KaririCode \Devkit \Core \Devkit ;
8+ use KaririCode \Devkit \Core \MigrationDetector ;
89
910/**
1011 * Generates all config files inside `.kcode/`.
@@ -45,11 +46,11 @@ public function execute(Devkit $devkit, array $arguments): int
4546
4647 // Scaffold devkit.php if requested
4748 if ($ this ->hasFlag ($ arguments , '--config ' )) {
48- $ this ->scaffoldDevkitConfig ($ context ->projectRoot , $ context );
49+ $ this ->scaffoldDevkitConfig ($ context ->projectRoot );
4950 }
5051
5152 // Hint: detect redundant root-level configs and dev dependencies
52- $ detector = new \ KaririCode \ Devkit \ Core \ MigrationDetector ();
53+ $ detector = new MigrationDetector ();
5354 $ migration = $ detector ->detect ($ context ->projectRoot );
5455
5556 if ($ migration ->hasRedundancies ) {
@@ -64,7 +65,7 @@ public function execute(Devkit $devkit, array $arguments): int
6465 return 0 ;
6566 }
6667
67- private function scaffoldDevkitConfig (string $ projectRoot, \ KaririCode \ Devkit \ Core \ ProjectContext $ context ): void
68+ private function scaffoldDevkitConfig (string $ projectRoot ): void
6869 {
6970 $ configPath = $ projectRoot . \DIRECTORY_SEPARATOR . 'devkit.php ' ;
7071
@@ -74,7 +75,7 @@ private function scaffoldDevkitConfig(string $projectRoot, \KaririCode\Devkit\Co
7475 return ;
7576 }
7677
77- $ content = <<<'PHP '
78+ $ content = <<<'PHP_WRAP '
7879 <?php
7980
8081 declare(strict_types=1);
@@ -146,7 +147,7 @@ private function scaffoldDevkitConfig(string $projectRoot, \KaririCode\Devkit\Co
146147 // 'psalm' => '^6.0',
147148 // ],
148149 ];
149- PHP ;
150+ PHP_WRAP ;
150151
151152 file_put_contents ($ configPath , $ content . \PHP_EOL );
152153
0 commit comments