@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $basePath = self::getBasePathForMedia($media); |
20 | 20 | $originalPath = $media->getCollection()->getOriginalPath(); |
21 | 21 | if (!empty($originalPath)) { |
22 | - $basePath .= DIRECTORY_SEPARATOR.$media->getCollection()->getOriginalPath(); |
|
22 | + $basePath .= DIRECTORY_SEPARATOR . $media->getCollection()->getOriginalPath(); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | return $basePath; |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public static function getBasePathForMedia($media) |
34 | 34 | { |
35 | - return '/'.$media->getCollection()->getName() |
|
36 | - .'/'.static::getFolderNameForMedia($media) |
|
37 | - .'/'.$media->getModel()->getPrimaryKey() |
|
35 | + return '/' . $media->getCollection()->getName() |
|
36 | + .'/' . static::getFolderNameForMedia($media) |
|
37 | + .'/' . $media->getModel()->getPrimaryKey() |
|
38 | 38 | .'/'; |
39 | 39 | } |
40 | 40 | |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public static function getBasePathForMediaConversion($media, $conversionName) |
63 | 63 | { |
64 | - return self::getBasePathForMedia($media).DIRECTORY_SEPARATOR.$conversionName; |
|
64 | + return self::getBasePathForMedia($media) . DIRECTORY_SEPARATOR . $conversionName; |
|
65 | 65 | } |
66 | 66 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | protected function initVariablesFromConfig() |
30 | 30 | { |
31 | - $configKey = 'media-library.contraints.'.$this->getName(); |
|
31 | + $configKey = 'media-library.contraints.' . $this->getName(); |
|
32 | 32 | |
33 | 33 | if (function_exists('config') && function_exists('app') && app()->has('config')) { |
34 | 34 | if (config()->has($configKey)) { |
@@ -74,9 +74,9 @@ |
||
74 | 74 | |
75 | 75 | protected function getDefaultFilterFunction(array $filters): Closure |
76 | 76 | { |
77 | - return function (Media $media) use ($filters) { |
|
77 | + return function(Media $media) use ($filters) { |
|
78 | 78 | foreach ($filters as $property => $value) { |
79 | - if (! Arr::has($media->custom_properties, $property)) { |
|
79 | + if (!Arr::has($media->custom_properties, $property)) { |
|
80 | 80 | return false; |
81 | 81 | } |
82 | 82 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | public function setFileFromSymfonyFile($file) |
75 | 75 | { |
76 | 76 | $this->file = $file; |
77 | - $this->setPathToFile($file->getPath().'/'.$file->getFilename()); |
|
77 | + $this->setPathToFile($file->getPath() . '/' . $file->getFilename()); |
|
78 | 78 | $this->setFileName(pathinfo($file->getFilename(), PATHINFO_BASENAME)); |
79 | 79 | $this->mediaName = pathinfo($file->getFilename(), PATHINFO_FILENAME); |
80 | 80 |