@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $this->imageManager = $imageManager ?: app('Intervention\Image\ImageManager'); |
22 | 22 | $maxAge = 3153600; // 30 days |
23 | 23 | $this->fsConfig = new FlysystemConfig([ |
24 | - 'CacheControl' => 'max-age=' . $maxAge . ', public', |
|
24 | + 'CacheControl' => 'max-age='.$maxAge.', public', |
|
25 | 25 | ]); |
26 | 26 | } |
27 | 27 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | public function basename() |
71 | 71 | { |
72 | - return sha1($this->sourceUrl . $this->maxHeight); |
|
72 | + return sha1($this->sourceUrl.$this->maxHeight); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | if (is_null($data)) { |
97 | 97 | $data = $this->download(); |
98 | 98 | if (!$data) { |
99 | - throw new \ErrorException('[CoverCache] Failed to download ' . $this->sourceUrl); |
|
99 | + throw new \ErrorException('[CoverCache] Failed to download '.$this->sourceUrl); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | 103 | $img = $this->imageManager->make($data); |
104 | 104 | if ($this->maxHeight && $img->height() > $this->maxHeight) { |
105 | - \Log::debug('[CachedImage] Resizing from ' . $img->height() . ' to ' . $this->maxHeight); |
|
105 | + \Log::debug('[CachedImage] Resizing from '.$img->height().' to '.$this->maxHeight); |
|
106 | 106 | $img->heighten($this->maxHeight); |
107 | 107 | $data = strval($img->encode('jpg')); |
108 | 108 | } |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | |
114 | 114 | $this->setMetadata($data, $img); |
115 | 115 | |
116 | - \Log::debug('[CachedImage] Storing image as ' . $img->width() . ' x ' . $img->height() . ', ' . strlen($data) . ' bytes'); |
|
116 | + \Log::debug('[CachedImage] Storing image as '.$img->width().' x '.$img->height().', '.strlen($data).' bytes'); |
|
117 | 117 | if (!$this->filesystem->write($this->basename(), $data, $this->fsConfig)) { |
118 | 118 | throw new \ErrorException('[CoverCache] Failed to upload thumb to S3'); |
119 | 119 | } |
120 | 120 | |
121 | - \Log::debug('[CachedImage] Wrote cached version as ' . $this->basename()); |
|
121 | + \Log::debug('[CachedImage] Wrote cached version as '.$this->basename()); |
|
122 | 122 | |
123 | 123 | return $this; |
124 | 124 | } |