mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 07:41:04 +03:30
feat: install phpstan and resolving reported errors in PHPStan
This commit is contained in:
@@ -2,18 +2,22 @@
|
||||
|
||||
namespace App\Services\Media;
|
||||
|
||||
use Spatie\MediaLibrary\Models\Media;
|
||||
use Spatie\MediaLibrary\PathGenerator\PathGenerator as BasePathGenerator;
|
||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||
use Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator;
|
||||
|
||||
class PathGenerator implements BasePathGenerator
|
||||
class PathGenerator extends DefaultPathGenerator
|
||||
{
|
||||
|
||||
/*
|
||||
* Get the path for the given media, relative to the root storage path.
|
||||
*/
|
||||
/**
|
||||
* @param Media $media
|
||||
* @return string
|
||||
*/
|
||||
public function getPath(Media $media): string
|
||||
{
|
||||
return md5($media->id).'/';
|
||||
return md5($media->id) . '/';
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -21,7 +25,7 @@ class PathGenerator implements BasePathGenerator
|
||||
*/
|
||||
public function getPathForConversions(Media $media): string
|
||||
{
|
||||
return $this->getPath($media).'conversions/';
|
||||
return $this->getPath($media) . 'conversions/';
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -29,7 +33,7 @@ class PathGenerator implements BasePathGenerator
|
||||
*/
|
||||
public function getPathForResponsiveImages(Media $media): string
|
||||
{
|
||||
return $this->getPath($media).'responsive-images/';
|
||||
return $this->getPath($media) . 'responsive-images/';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user