File tree 1 file changed +4
-8
lines changed
packages/support/src/Assets
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ abstract class Asset
13
13
14
14
protected string $ package ;
15
15
16
- protected ? string $ path = null ;
16
+ protected string $ path = null ;
17
17
18
- final public function __construct (string $ id , ?string $ path = null )
18
+ final public function __construct (string $ id , ?string $ path = ' / ' )
19
19
{
20
20
$ this ->id = $ id ;
21
21
$ this ->path = $ path ;
22
22
}
23
23
24
- public static function make (string $ id , ?string $ path = null ): static
24
+ public static function make (string $ id , ?string $ path = ' / ' ): static
25
25
{
26
26
return app (static ::class, ['id ' => $ id , 'path ' => $ path ]);
27
27
}
@@ -50,17 +50,13 @@ public function getPackage(): string
50
50
return $ this ->package ;
51
51
}
52
52
53
- public function getPath (): ? string
53
+ public function getPath (): string
54
54
{
55
55
return $ this ->path ;
56
56
}
57
57
58
58
public function isRemote (): bool
59
59
{
60
- if ($ this ->getPath () === null ) {
61
- return false ;
62
- }
63
-
64
60
return str ($ this ->getPath ())->startsWith (['http:// ' , 'https:// ' , '// ' ]);
65
61
}
66
62
You can’t perform that action at this time.
0 commit comments