|
@@ -96,7 +96,7 @@ discard block |
|
|
block discarded – undo |
|
96
|
96
|
->setAllowedTypes('channels', 'array') |
|
97
|
97
|
->setNormalizer('channels', LazyOption::findBy($this->channelRepository, 'code')) |
|
98
|
98
|
|
|
99
|
|
- ->setDefault('image', function (Options $options): string { |
|
|
99
|
+ ->setDefault('image', function(Options $options): string { |
|
100
|
100
|
return __DIR__.'/../../Resources/fixtures/article/0'.rand(1, 4).'.png'; |
|
101
|
101
|
}) |
|
102
|
102
|
->setAllowedTypes('image', ['string']) |
|
@@ -195,7 +195,7 @@ discard block |
|
|
block discarded – undo |
|
195
|
195
|
private function createImage(string $imagePath): UploadedFile |
|
196
|
196
|
{ |
|
197
|
197
|
$imagePath = $this->fileLocator === null ? $imagePath : $this->fileLocator->locate($imagePath); |
|
198
|
|
- if(is_array($imagePath) && count($imagePath) > 0) |
|
|
198
|
+ if (is_array($imagePath) && count($imagePath) > 0) |
|
199
|
199
|
$imagePath = $imagePath[0]; |
|
200
|
200
|
|
|
201
|
201
|
return new UploadedFile($imagePath, basename($imagePath)); |
Please login to merge, or discard this patch.