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