@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $imageWebP = "{$this->cachePath}/{$this->imageName}.webp"; |
| 90 | - $imageExt = "{$this->cachePath}/{$this->imageName}." . pathinfo($this->imagePath)['extension']; |
|
| 90 | + $imageExt = "{$this->cachePath}/{$this->imageName}.".pathinfo($this->imagePath)['extension']; |
|
| 91 | 91 | |
| 92 | 92 | if ($this->webP && file_exists($imageWebP) && is_file($imageWebP)) { |
| 93 | 93 | return $imageWebP; |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | $src_y = round(($src_h - ($src_h / $cmp_y * $cmp_x))); //2 |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $src_x = (int)$src_x; |
|
| 177 | - $src_h = (int)$src_h; |
|
| 178 | - $src_y = (int)$src_y; |
|
| 179 | - $src_y = (int)$src_y; |
|
| 176 | + $src_x = (int) $src_x; |
|
| 177 | + $src_h = (int) $src_h; |
|
| 178 | + $src_y = (int) $src_y; |
|
| 179 | + $src_y = (int) $src_y; |
|
| 180 | 180 | |
| 181 | 181 | if ($this->imageMime == "image/jpeg") { |
| 182 | 182 | return $this->fromJpg($width, $height, $src_x, $src_y, $src_w, $src_h); |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | public function toWebP($image): string |
| 259 | 259 | { |
| 260 | 260 | try { |
| 261 | - $webPConverted = pathinfo($image)["dirname"] . "/" . pathinfo($image)["filename"] . ".webp"; |
|
| 261 | + $webPConverted = pathinfo($image)["dirname"]."/".pathinfo($image)["filename"].".webp"; |
|
| 262 | 262 | WebPConvert::convert($image, $webPConverted, ["default-quality" => $this->quality]); |
| 263 | 263 | unlink($image); |
| 264 | 264 | return $webPConverted; |