24
24
use Magento \Framework \App \Filesystem \DirectoryList ;
25
25
26
26
/**
27
+ * Image resize service.
28
+ *
27
29
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
28
30
*/
29
31
class ImageResize
@@ -123,7 +125,8 @@ public function __construct(
123
125
}
124
126
125
127
/**
126
- * Create resized images of different sizes from an original image
128
+ * Create resized images of different sizes from an original image.
129
+ *
127
130
* @param string $originalImageName
128
131
* @throws NotFoundException
129
132
*/
@@ -141,7 +144,8 @@ public function resizeFromImageName(string $originalImageName)
141
144
}
142
145
143
146
/**
144
- * Create resized images of different sizes from themes
147
+ * Create resized images of different sizes from themes.
148
+ *
145
149
* @param array|null $themes
146
150
* @return \Generator
147
151
* @throws NotFoundException
@@ -169,7 +173,8 @@ public function resizeFromThemes(array $themes = null): \Generator
169
173
}
170
174
171
175
/**
172
- * Search the current theme
176
+ * Search the current theme.
177
+ *
173
178
* @return array
174
179
*/
175
180
private function getThemesInUse (): array
@@ -187,7 +192,8 @@ private function getThemesInUse(): array
187
192
}
188
193
189
194
/**
190
- * Get view images data from themes
195
+ * Get view images data from themes.
196
+ *
191
197
* @param array $themes
192
198
* @return array
193
199
*/
@@ -211,7 +217,8 @@ private function getViewImages(array $themes): array
211
217
}
212
218
213
219
/**
214
- * Get unique image index
220
+ * Get unique image index.
221
+ *
215
222
* @param array $imageData
216
223
* @return string
217
224
*/
@@ -223,7 +230,8 @@ private function getUniqueImageIndex(array $imageData): string
223
230
}
224
231
225
232
/**
226
- * Make image
233
+ * Make image.
234
+ *
227
235
* @param string $originalImagePath
228
236
* @param array $imageParams
229
237
* @return Image
@@ -241,7 +249,8 @@ private function makeImage(string $originalImagePath, array $imageParams): Image
241
249
}
242
250
243
251
/**
244
- * Resize image
252
+ * Resize image.
253
+ *
245
254
* @param array $viewImage
246
255
* @param string $originalImagePath
247
256
* @param string $originalImageName
0 commit comments