@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | if (isset($image_size_details['crop']) && $image_size_details['crop']) { |
| 201 | 201 | $resizedImage = $resizedImage->fit($w, $h); |
| 202 | 202 | } else { |
| 203 | - $resizedImage = $resizedImage->resize($w, $h, static function ($constraint) { |
|
| 203 | + $resizedImage = $resizedImage->resize($w, $h, static function($constraint) { |
|
| 204 | 204 | $constraint->aspectRatio(); |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | if (isset($imageSizeDetails['crop']) && $imageSizeDetails['crop']) { |
| 411 | 411 | $resizedImage = $resizedImage->fit($w, $h); |
| 412 | 412 | } else { |
| 413 | - $resizedImage = $resizedImage->resize($w, $h, static function (Constraint $constraint) { |
|
| 413 | + $resizedImage = $resizedImage->resize($w, $h, static function(Constraint $constraint) { |
|
| 414 | 414 | $constraint->aspectRatio(); |
| 415 | 415 | }); |
| 416 | 416 | } |
@@ -624,11 +624,11 @@ discard block |
||
| 624 | 624 | |
| 625 | 625 | public function deletePostImage(Post $post):array{ |
| 626 | 626 | $deletedImageSizes = []; |
| 627 | - foreach(array_keys(config('blogetc.image_sizes')) as $size) { |
|
| 627 | + foreach (array_keys(config('blogetc.image_sizes')) as $size) { |
|
| 628 | 628 | $imageFilename = $post->$size; |
| 629 | - $path = $this->image_destination_path() .'/'. $imageFilename; |
|
| 629 | + $path = $this->image_destination_path().'/'.$imageFilename; |
|
| 630 | 630 | |
| 631 | - if($imageFilename && file_exists($path) ){ |
|
| 631 | + if ($imageFilename && file_exists($path)) { |
|
| 632 | 632 | unlink($path); |
| 633 | 633 | $deletedImageSizes[] = $size; |
| 634 | 634 | } |
@@ -203,7 +203,7 @@ |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | public function clearImageSizes(Post $post, array $sizes) { |
| 206 | - foreach($sizes as $size) { |
|
| 206 | + foreach ($sizes as $size) { |
|
| 207 | 207 | $post->$size = null; |
| 208 | 208 | } |
| 209 | 209 | |