@@ -96,7 +96,7 @@ discard block |
||
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 |
||
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)); |
@@ -195,8 +195,9 @@ |
||
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) |
|
199 | - $imagePath = $imagePath[0]; |
|
198 | + if(is_array($imagePath) && count($imagePath) > 0) { |
|
199 | + $imagePath = $imagePath[0]; |
|
200 | + } |
|
200 | 201 | |
201 | 202 | return new UploadedFile($imagePath, basename($imagePath)); |
202 | 203 | } |