File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 5
5
namespace DragonCode \LaravelDeployOperations \Concerns ;
6
6
7
7
use Composer \InstalledVersions ;
8
- use DragonCode \Support \Facades \Helpers \Arr ;
9
8
use DragonCode \Support \Facades \Helpers \Str ;
10
9
use Illuminate \Foundation \Console \AboutCommand ;
11
10
12
11
trait HasAbout
13
12
{
14
- protected string $ composer = __DIR__ . '/../../composer.json ' ;
15
-
16
- protected ?string $ packageName = null ;
13
+ protected string $ packageName = 'dragon-code/laravel-deploy-operations ' ;
17
14
18
15
protected function registerAbout (): void
19
16
{
@@ -24,7 +21,7 @@ protected function registerAbout(): void
24
21
25
22
protected function getPackageName (): string
26
23
{
27
- return Str::of ($ this ->loadPackageName () )
24
+ return Str::of ($ this ->packageName )
28
25
->after ('/ ' )
29
26
->snake ()
30
27
->replace ('_ ' , ' ' )
@@ -34,11 +31,6 @@ protected function getPackageName(): string
34
31
35
32
protected function getPackageVersion (): string
36
33
{
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 );
43
35
}
44
36
}
You can’t perform that action at this time.
0 commit comments