|
@@ -128,8 +128,8 @@ discard block |
|
|
block discarded – undo |
|
128
|
128
|
|
|
129
|
129
|
$imageFinder = new Finder(); |
|
130
|
130
|
|
|
131
|
|
- $imagesPath = __DIR__ . '/../Resources/fixtures/banner/images'; |
|
132
|
|
- $mobileImagesPath = __DIR__ . '/../Resources/fixtures/banner/mobile-images'; |
|
|
131
|
+ $imagesPath = __DIR__.'/../Resources/fixtures/banner/images'; |
|
|
132
|
+ $mobileImagesPath = __DIR__.'/../Resources/fixtures/banner/mobile-images'; |
|
133
|
133
|
|
|
134
|
134
|
foreach ($imageFinder->files()->in($imagesPath)->name('01.png') as $img) { |
|
135
|
135
|
/** @var string $path */ |
|
@@ -157,7 +157,7 @@ discard block |
|
|
block discarded – undo |
|
157
|
157
|
foreach ($channels as $channel) { |
|
158
|
158
|
$imageIndex = 1; |
|
159
|
159
|
$mobileImageIndex = 1; |
|
160
|
|
- for ($i=1; $i <= $options['banners_per_channel']; $i++) { |
|
|
160
|
+ for ($i = 1; $i <= $options[ 'banners_per_channel' ]; $i++) { |
|
161
|
161
|
/** @var BannerInterface $banner */ |
|
162
|
162
|
$banner = $this->bannerFactory->createNew(); |
|
163
|
163
|
|
|
@@ -172,8 +172,8 @@ discard block |
|
|
block discarded – undo |
|
172
|
172
|
|
|
173
|
173
|
$imageFinder = new Finder(); |
|
174
|
174
|
|
|
175
|
|
- $imagesPath = __DIR__ . '/../Resources/fixtures/banner/images'; |
|
176
|
|
- $mobileImagesPath = __DIR__ . '/../Resources/fixtures/banner/mobile-images'; |
|
|
175
|
+ $imagesPath = __DIR__.'/../Resources/fixtures/banner/images'; |
|
|
176
|
+ $mobileImagesPath = __DIR__.'/../Resources/fixtures/banner/mobile-images'; |
|
177
|
177
|
|
|
178
|
178
|
foreach ($imageFinder->files()->in($imagesPath)->name('0'.$imageIndex.'.png') as $img) { |
|
179
|
179
|
/** @var string $path */ |
|
@@ -183,7 +183,7 @@ discard block |
|
|
block discarded – undo |
|
183
|
183
|
$file = new UploadedFile($path, $filename); |
|
184
|
184
|
$banner->setImageFile($file); |
|
185
|
185
|
} |
|
186
|
|
- $imageIndex = $imageIndex>=4?1:$imageIndex+1; |
|
|
186
|
+ $imageIndex = $imageIndex >= 4 ? 1 : $imageIndex+1; |
|
187
|
187
|
|
|
188
|
188
|
foreach ($imageFinder->files()->in($mobileImagesPath)->name('0'.$mobileImageIndex.'.png') as $img) { |
|
189
|
189
|
/** @var string $path */ |
|
@@ -193,7 +193,7 @@ discard block |
|
|
block discarded – undo |
|
193
|
193
|
$file = new UploadedFile($path, $filename); |
|
194
|
194
|
$banner->setMobileImageFile($file); |
|
195
|
195
|
} |
|
196
|
|
- $mobileImageIndex = $mobileImageIndex>=4?1:$mobileImageIndex+1; |
|
|
196
|
+ $mobileImageIndex = $mobileImageIndex >= 4 ? 1 : $mobileImageIndex+1; |
|
197
|
197
|
} |
|
198
|
198
|
|
|
199
|
199
|
$this->objectManager->persist($banner); |