File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,13 @@ public function __construct(
1212 ) {
1313 $ entity = $ this ->getEntity ();
1414
15- $ filePath = $ this ->getFilePath ();
16-
17- parent ::__construct ("Cannot create {$ entity } cause it already exists. Remove {$ filePath } and run command again. " );
15+ parent ::__construct ("Cannot create {$ entity } cause it already exists. Remove {$ this ->$ filePath } and run command again. " );
1816 }
1917
2018 protected function getEntity (): string
2119 {
22- $ entity = Str::afterLast ($ this ->filePath , '/ ' );
23-
24- return Str::before ($ entity , '.php ' );
25- }
26-
27- protected function getFilePath (): string
28- {
29- $ filePath = realpath ($ this ->filePath );
20+ $ fileName = Str::afterLast ($ this ->filePath , '/ ' );
3021
31- return empty ( $ filePath ) ? $ this -> filePath : "{ $ filePath } :1 " ;
22+ return Str:: before ( $ fileName , ' .php ' ) ;
3223 }
3324}
You can’t perform that action at this time.
0 commit comments