Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Form/EventListener/SingleUploadSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function postSubmit(FormEvent $event): void
}
}

private function isFieldSingleUpload(ResolvedFormTypeInterface $formTypeInterface = null): bool
private function isFieldSingleUpload(?ResolvedFormTypeInterface $formTypeInterface = null): bool
{
if ($formTypeInterface == null) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion Storage/FileStorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ interface FileStorageInterface
{
public function storeFiles(array $files): array;

public function getFile(string $fileId = null): ?UploadedFile;
public function getFile(?string $fileId = null): ?UploadedFile;
}
4 changes: 2 additions & 2 deletions Storage/LocalFileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class LocalFileStorage implements FileStorageInterface

private SessionInterface $session;

public function __construct(private readonly RequestStack $requestStack, string $tempDir = null)
public function __construct(private readonly RequestStack $requestStack, ?string $tempDir = null)
{
$this->temporaryDirectory = $tempDir ?: sys_get_temp_dir() . DIRECTORY_SEPARATOR . 's2a' . DIRECTORY_SEPARATOR . 'collectionupload';
}
Expand Down Expand Up @@ -52,7 +52,7 @@ public function storeFiles(array $files): array
return $handledFiles;
}

public function getFile(string $fileId = null): ?UploadedFile
public function getFile(?string $fileId = null): ?UploadedFile
{
if (is_null($fileId)) {
return null;
Expand Down