File tree 1 file changed +10
-8
lines changed
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
22
22
23
23
public function handle (): void
24
24
{
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 ));
26
28
}
27
29
28
- protected function message (): string
30
+ protected function message (string $ path ): string
29
31
{
30
- return 'Operation [ ' . $ this ->displayName ($ this -> getFullPath () ) . '] created successfully ' ;
32
+ return 'Operation [ ' . $ this ->displayName ($ path ) . '] created successfully ' ;
31
33
}
32
34
33
- protected function create (): void
35
+ protected function create (string $ path ): void
34
36
{
35
- File::copy ($ this ->stubPath (), $ this -> getFullPath () );
37
+ File::copy ($ this ->stubPath (), $ path );
36
38
}
37
39
38
40
protected function displayName (string $ path ): string
@@ -46,9 +48,9 @@ protected function displayName(string $path): string
46
48
47
49
protected function getName (): string
48
50
{
49
- $ branch = $ this ->getBranchName ();
50
-
51
- return $ this -> getFilename ( $ branch );
51
+ return $ this ->getFilename (
52
+ $ this -> getBranchName ()
53
+ );
52
54
}
53
55
54
56
protected function getPath (): string
You can’t perform that action at this time.
0 commit comments