Completed
Pull Request — master (#11)
by
unknown
05:57
created
src/Distilleries/Contentful/Helpers/Image.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
             'fm' => config('contentful.image.use_webp') ? $format : null,
36 36
             'fl' => static::detectProgressive($format, $useProgressive) ? 'progressive' : null,
37 37
             'fit' => static::detectFit($fit),
38
-        ])->filter(function ($value) {
38
+        ])->filter(function($value) {
39 39
             return !empty($value);
40
-        })->each(function ($value, $key) use (& $imageUrl) {
41
-            $imageUrl .= $key . '=' . $value . '&';
40
+        })->each(function($value, $key) use (& $imageUrl) {
41
+            $imageUrl .= $key.'='.$value.'&';
42 42
         });
43 43
 
44 44
         return static::replaceHosts($url, $imageUrl);
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
         $searchHosts = config('contentful.image.search_hosts');
62 62
         $replaceHost = config('contentful.image.replace_host');
63
-        if (! empty($searchHosts) && ! empty($replaceHost)) {
63
+        if (!empty($searchHosts) && !empty($replaceHost)) {
64 64
             $url = str_replace(explode(',', $searchHosts), $replaceHost, $url);
65 65
         }
66 66
 
67
-        return ! empty($url) ? $url . '?' . trim($imageUrl, '&') : '';
67
+        return !empty($url) ? $url.'?'.trim($imageUrl, '&') : '';
68 68
     }
69 69
 
70 70
     /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return 'webp';
81 81
         }
82 82
 
83
-        return ! empty($format) ? $format : null;
83
+        return !empty($format) ? $format : null;
84 84
     }
85 85
 
86 86
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         if ($useProgressive === null) {
117
-            $useProgressive = ! empty(config('contentful.image.use_progressive'));
117
+            $useProgressive = !empty(config('contentful.image.use_progressive'));
118 118
         }
119 119
 
120 120
         return $useProgressive;
Please login to merge, or discard this patch.