Upgrade to 3.8.0
This commit is contained in:
@@ -23,15 +23,11 @@ class Asset
|
||||
|
||||
/**
|
||||
* Relative file path
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $path;
|
||||
protected string|null $path = null;
|
||||
|
||||
/**
|
||||
* Creates a new Asset object for the given path.
|
||||
*
|
||||
* @param string $path
|
||||
*/
|
||||
public function __construct(string $path)
|
||||
{
|
||||
@@ -44,8 +40,6 @@ class Asset
|
||||
|
||||
/**
|
||||
* Returns a unique id for the asset
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function id(): string
|
||||
{
|
||||
@@ -54,8 +48,6 @@ class Asset
|
||||
|
||||
/**
|
||||
* Create a unique media hash
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function mediaHash(): string
|
||||
{
|
||||
@@ -64,8 +56,6 @@ class Asset
|
||||
|
||||
/**
|
||||
* Returns the relative path starting at the media folder
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function mediaPath(): string
|
||||
{
|
||||
@@ -74,8 +64,6 @@ class Asset
|
||||
|
||||
/**
|
||||
* Returns the absolute path to the file in the public media folder
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function mediaRoot(): string
|
||||
{
|
||||
@@ -84,8 +72,6 @@ class Asset
|
||||
|
||||
/**
|
||||
* Returns the absolute Url to the file in the public media folder
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function mediaUrl(): string
|
||||
{
|
||||
@@ -95,8 +81,6 @@ class Asset
|
||||
/**
|
||||
* Returns the path of the file from the web root,
|
||||
* excluding the filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function path(): string
|
||||
{
|
||||
@@ -106,10 +90,9 @@ class Asset
|
||||
/**
|
||||
* Setter for the path
|
||||
*
|
||||
* @param string $path
|
||||
* @return $this
|
||||
*/
|
||||
protected function setPath(string $path)
|
||||
protected function setPath(string $path): static
|
||||
{
|
||||
$this->path = $path === '.' ? '' : $path;
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user