@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | private function image(int $width, int $height = null): ?string |
100 | 100 | { |
101 | 101 | $imageWebP = "{$this->cachePath}/{$this->imageName}.webp"; |
102 | - $imageExt = "{$this->cachePath}/{$this->imageName}." . pathinfo($this->imagePath)['extension']; |
|
102 | + $imageExt = "{$this->cachePath}/{$this->imageName}.".pathinfo($this->imagePath)['extension']; |
|
103 | 103 | |
104 | 104 | if ($this->webP && file_exists($imageWebP) && is_file($imageWebP)) { |
105 | 105 | return $imageWebP; |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | $src_y = round(($src_h - ($src_h / $cmp_y * $cmp_x))); //2 |
186 | 186 | } |
187 | 187 | |
188 | - $height = (int)$height; |
|
189 | - $src_x = (int)$src_x; |
|
190 | - $src_y = (int)$src_y; |
|
191 | - $src_w = (int)$src_w; |
|
192 | - $src_h = (int)$src_h; |
|
188 | + $height = (int) $height; |
|
189 | + $src_x = (int) $src_x; |
|
190 | + $src_y = (int) $src_y; |
|
191 | + $src_w = (int) $src_w; |
|
192 | + $src_h = (int) $src_h; |
|
193 | 193 | |
194 | 194 | if ($this->imageMime == "image/jpeg") { |
195 | 195 | return $this->fromJpg($width, $height, $src_x, $src_y, $src_w, $src_h); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | public function toWebP(string $image, $unlinkImage = true): string |
277 | 277 | { |
278 | 278 | try { |
279 | - $webPConverted = pathinfo($image)["dirname"] . "/" . pathinfo($image)["filename"] . ".webp"; |
|
279 | + $webPConverted = pathinfo($image)["dirname"]."/".pathinfo($image)["filename"].".webp"; |
|
280 | 280 | WebPConvert::convert($image, $webPConverted, ["default-quality" => $this->quality]); |
281 | 281 | |
282 | 282 | if ($unlinkImage) { |