Skip to content

Commit 5893ebd

Browse files
typos corrected by phpstan
1 parent cf3eb12 commit 5893ebd

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/Decorator/FlysystemFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace EasyCorp\Bundle\EasyAdminBundle\Decorator;
44

55
use League\Flysystem\FilesystemOperator;
6-
use Symfony\Component\HttpFoundation\File\File as File;
6+
use Symfony\Component\HttpFoundation\File\File;
77

88
class FlysystemFile extends File
99
{
@@ -25,4 +25,4 @@ public function getMTime(): int
2525
{
2626
return $this->filesystemOperator->lastModified($this->getPathname());
2727
}
28-
}
28+
}

src/Field/Configurator/ImageConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private function getImagesPaths(?array $images, ?string $basePath, ?FilesystemOp
7878

7979
private function getImagePath(?string $imagePath, ?string $basePath, ?FilesystemOperator $filesystemOperator): ?string
8080
{
81-
if (null !==$filesystemOperator && null !== $imagePath) {
81+
if (null !== $filesystemOperator && null !== $imagePath) {
8282
try {
8383
return $filesystemOperator->publicUrl($imagePath);
8484
} catch (UnableToGeneratePublicUrl $e) {

src/Field/ImageField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function setUploadedFileNamePattern($patternOrCallable): self
8686
* - move uploaded file to its final destination
8787
* - delete the previously uploaded file
8888
* - retrieve file public url
89-
* See https://github.com/thephpleague/flysystem-bundle
89+
* See https://github.com/thephpleague/flysystem-bundle.
9090
*/
9191
public function setFilesystemOperator(FilesystemOperator $filesystemOperator): self
9292
{

src/Form/DataTransformer/StringToFileTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace EasyCorp\Bundle\EasyAdminBundle\Form\DataTransformer;
44

5+
use EasyCorp\Bundle\EasyAdminBundle\Decorator\FlysystemFile;
56
use League\Flysystem\FilesystemOperator;
67
use Symfony\Component\Form\DataTransformerInterface;
78
use Symfony\Component\Form\Exception\TransformationFailedException;
89
use Symfony\Component\HttpFoundation\File\File;
9-
use EasyCorp\Bundle\EasyAdminBundle\Decorator\FlysystemFile;
1010
use Symfony\Component\HttpFoundation\File\UploadedFile;
1111

1212
/**

tests/Form/DataTransformer/StringToFileTransformerTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99

1010
class StringToFileTransformerTest extends TestCase
1111
{
12-
1312
public function testTransform(): void
1413
{
15-
$uploadFilename = static fn($value) => 'foo';
16-
$uploadValidate = static fn($filename) => 'foo';
14+
$uploadFilename = static fn ($value) => 'foo';
15+
$uploadValidate = static fn ($filename) => 'foo';
1716
$filesystemOperatorMock = $this->createStub(FilesystemOperator::class);
1817
$filesystemOperatorMock
1918
->method('fileExists')

0 commit comments

Comments
 (0)