Completed
Push — master ( 33debe...7a54e1 )
by Dan Michael O.
16:05
created
app/CachedImage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $this->imageManager = $imageManager ?: app('Intervention\Image\ImageManager');
23 23
         $maxAge = 3153600; // 30 days
24 24
         $this->fsConfig = new FlysystemConfig([
25
-            'CacheControl' => 'max-age=' . $maxAge . ', public',
25
+            'CacheControl' => 'max-age='.$maxAge.', public',
26 26
         ]);
27 27
     }
28 28
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         if (is_null($data)) {
93 93
             $data = $this->download();
94 94
             if (!$data) {
95
-                throw new \ErrorException('[CoverCache] Failed to download ' . $this->sourceUrl);
95
+                throw new \ErrorException('[CoverCache] Failed to download '.$this->sourceUrl);
96 96
             }
97 97
         }
98 98
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         $img = $this->imageManager->make($data);
102 102
         if ($this->maxHeight && $img->height() > $this->maxHeight) {
103
-            \Log::debug('[CachedImage] Resizing from ' . $img->height() . ' to ' . $this->maxHeight);
103
+            \Log::debug('[CachedImage] Resizing from '.$img->height().' to '.$this->maxHeight);
104 104
             $img->heighten($this->maxHeight);
105 105
             $data = strval($img->encode('jpg'));
106 106
         }
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 
112 112
         $this->setMetadata($data, $img);
113 113
 
114
-        \Log::debug('[CachedImage] Storing image as ' . $img->width() . ' x ' . $img->height() . ', ' . strlen($data) . ' bytes');
114
+        \Log::debug('[CachedImage] Storing image as '.$img->width().' x '.$img->height().', '.strlen($data).' bytes');
115 115
         if (!$this->filesystem->write($this->cacheKey, $data, $this->fsConfig)) {
116 116
             throw new \ErrorException('[CoverCache] Failed to upload thumb to S3');
117 117
         }
118 118
 
119
-        \Log::debug('[CachedImage] Wrote cached version as ' . $this->cacheKey);
119
+        \Log::debug('[CachedImage] Wrote cached version as '.$this->cacheKey);
120 120
 
121 121
         return $this;
122 122
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $data = $this->filesystem->read($this->cacheKey);
136 136
         $blob = strval($data['contents']);
137
-        \Log::debug('[CachedImage] Read ' .$this->cacheKey . ': ' . strlen($blob) . ' bytes');
137
+        \Log::debug('[CachedImage] Read '.$this->cacheKey.': '.strlen($blob).' bytes');
138 138
 
139 139
         return \CoverCache::putBlob($blob, $maxHeight);
140 140
     }
Please login to merge, or discard this patch.