diff --git a/src/Form/DataTransformer/StringToFileTransformer.php b/src/Form/DataTransformer/StringToFileTransformer.php index e80cac8048..e7f51b455b 100644 --- a/src/Form/DataTransformer/StringToFileTransformer.php +++ b/src/Form/DataTransformer/StringToFileTransformer.php @@ -29,7 +29,7 @@ public function __construct(?string $uploadDir, callable $uploadFilename, callab $this->filesystemOperator = $filesystemOperator; } - public function transform($value) + public function transform($value): null|File|array { if (null === $value || [] === $value) { return null; @@ -46,7 +46,7 @@ public function transform($value) return array_map([$this, 'doTransform'], $value); } - public function reverseTransform($value) + public function reverseTransform($value): null|string|array { if (null === $value || [] === $value) { return null;