File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,19 @@ class Make extends Processor
2222
2323 public function handle (): void
2424 {
25- $ this ->notification ->task ($ this ->message (), fn () => $ this ->create ());
25+ $ fullPath = $ this ->getFullPath ();
26+
27+ $ this ->notification ->task ($ this ->message ($ fullPath ), fn () => $ this ->create ($ fullPath ));
2628 }
2729
28- protected function message (): string
30+ protected function message (string $ path ): string
2931 {
30- return 'Operation [ ' . $ this ->displayName ($ this -> getFullPath () ) . '] created successfully ' ;
32+ return 'Operation [ ' . $ this ->displayName ($ path ) . '] created successfully ' ;
3133 }
3234
33- protected function create (): void
35+ protected function create (string $ path ): void
3436 {
35- File::copy ($ this ->stubPath (), $ this -> getFullPath () );
37+ File::copy ($ this ->stubPath (), $ path );
3638 }
3739
3840 protected function displayName (string $ path ): string
@@ -46,9 +48,9 @@ protected function displayName(string $path): string
4648
4749 protected function getName (): string
4850 {
49- $ branch = $ this ->getBranchName ();
50-
51- return $ this -> getFilename ( $ branch );
51+ return $ this ->getFilename (
52+ $ this -> getBranchName ()
53+ );
5254 }
5355
5456 protected function getPath (): string
You can’t perform that action at this time.
0 commit comments