We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 276-293 (lines=18) @@ | ||
273 | $variant_name = $new_file_name.'-'.$variant.'.'.$file->getClientOriginalExtension(); |
|
274 | $variant_file = $destination_path.'/'.$variant_name; |
|
275 | ||
276 | if ($dimensions) { |
|
277 | $width = $dimensions[0]; |
|
278 | $height = $dimensions[1]; |
|
279 | ||
280 | if ($img->width() > $width || $img->height() > $height) { |
|
281 | $img->resize($width, $height, function ($constraint) { |
|
282 | $constraint->aspectRatio(); |
|
283 | }) |
|
284 | ->save($disk_root.'/'.$variant_file); |
|
285 | } else { |
|
286 | $img->save($disk_root.'/'.$variant_file); |
|
287 | } |
|
288 | ||
289 | $image_variations[$variant] = $public_path.'/'.$variant_file; |
|
290 | } else { |
|
291 | $image_variations['original'] = $public_path.'/'.$file_path; |
|
292 | } |
|
293 | } |
|
294 | } else { |
|
295 | $image_variations['original'] = $public_path.'/'.$file_path; |
|
296 | $image_variations['thumb'] = $public_path.'/'.$file_path; |
|
@@ 334-352 (lines=19) @@ | ||
331 | $variant_name = $new_file_name.'-'.$variant.$extension; |
|
332 | $variant_file = $destination_path.'/'.$variant_name; |
|
333 | ||
334 | if ($dimensions) { |
|
335 | $width = $dimensions[0]; |
|
336 | $height = $dimensions[1]; |
|
337 | ||
338 | if ($img->width() > $width || $img->height() > $height) { |
|
339 | $img->resize($width, $height, function ($constraint) { |
|
340 | $constraint->aspectRatio(); |
|
341 | }) |
|
342 | ->save($disk_root.'/'.$variant_file); |
|
343 | } else { |
|
344 | $img->save($disk_root.'/'.$variant_file); |
|
345 | } |
|
346 | ||
347 | $image_variations[$variant] = $public_path.'/'.$variant_file; |
|
348 | } else { |
|
349 | $img->save($disk_root.'/'.$variant_file); |
|
350 | $image_variations['original'] = $variant_file; |
|
351 | } |
|
352 | } |
|
353 | ||
354 | $this->attributes[$attribute_name] = $image_variations['original']; |
|
355 | } |