Skip to content

Commit e079888

Browse files
freekmurzegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 21a4e6b commit e079888

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/MediaCollections/Exceptions/FileNameNotAllowed.php

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Spatie\MediaLibrary\MediaCollections\Exceptions;
44

5-
use Spatie\MediaLibrary\Support\File;
6-
75
class FileNameNotAllowed extends FileCannotBeAdded
86
{
97
public static function create(string $orignalName, string $sanitizedName): self

src/MediaCollections/FileAdder.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Support\Facades\Storage;
88
use Illuminate\Support\Str;
99
use Illuminate\Support\Traits\Macroable;
10-
use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace;
1110
use Spatie\MediaLibrary\Conversions\ImageGenerators\Image as ImageGenerator;
1211
use Spatie\MediaLibrary\HasMedia;
1312
use Spatie\MediaLibrary\MediaCollections\Exceptions\DiskCannotBeAccessed;
@@ -394,7 +393,7 @@ public function defaultSanitizer(string $fileName): string
394393
{
395394
$sanitizedFileName = preg_replace('#\p{C}+#u', '', $fileName);
396395

397-
$sanitizedFileName = str_replace(['#', '/', '\\', ' '], '-', $sanitizedFileName);
396+
$sanitizedFileName = str_replace(['#', '/', '\\', ' '], '-', $sanitizedFileName);
398397

399398
$phpExtensions = [
400399
'php', 'php3', 'php4', 'php5', 'php7', 'php8', 'phtml', 'phar',

tests/MediaCollections/FileAdderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
->toEqual('Scan-9.14.2022-7.23.28.pdf');
2626
});
2727

28-
it('will throw an exception if the sanitized file name is a php file name', function() {
28+
it('will throw an exception if the sanitized file name is a php file name', function () {
2929
$adder = app(FileAdder::class);
3030

3131
$adder->defaultSanitizer('filename.php‎');

0 commit comments

Comments
 (0)