File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 55namespace DragonCode \LaravelDeployOperations \Concerns ;
66
77use Composer \InstalledVersions ;
8- use DragonCode \Support \Facades \Helpers \Arr ;
98use DragonCode \Support \Facades \Helpers \Str ;
109use Illuminate \Foundation \Console \AboutCommand ;
1110
1211trait HasAbout
1312{
14- protected string $ composer = __DIR__ . '/../../composer.json ' ;
15-
16- protected ?string $ packageName = null ;
13+ protected string $ packageName = 'dragon-code/laravel-deploy-operations ' ;
1714
1815 protected function registerAbout (): void
1916 {
@@ -24,7 +21,7 @@ protected function registerAbout(): void
2421
2522 protected function getPackageName (): string
2623 {
27- return Str::of ($ this ->loadPackageName () )
24+ return Str::of ($ this ->packageName )
2825 ->after ('/ ' )
2926 ->snake ()
3027 ->replace ('_ ' , ' ' )
@@ -34,11 +31,6 @@ protected function getPackageName(): string
3431
3532 protected function getPackageVersion (): string
3633 {
37- return InstalledVersions::getPrettyVersion ($ this ->loadPackageName ());
38- }
39-
40- protected function loadPackageName (): string
41- {
42- return $ this ->packageName ??= Arr::ofFile ($ this ->composer )->get ('name ' );
34+ return InstalledVersions::getPrettyVersion ($ this ->packageName );
4335 }
4436}
You can’t perform that action at this time.
0 commit comments