From 8aa923e4516ebbfc9e7cddbf62d290a116bed7a4 Mon Sep 17 00:00:00 2001 From: Dennis Prins Date: Wed, 7 Sep 2022 17:40:47 +0200 Subject: [PATCH] Update WebpGenerator.php --- src/WebpGenerator.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/WebpGenerator.php b/src/WebpGenerator.php index 4c5967d..7fe5b5e 100644 --- a/src/WebpGenerator.php +++ b/src/WebpGenerator.php @@ -10,8 +10,8 @@ final class WebpGenerator { use Injectable; - private static bool $enabled = true; - private static int $quality = 80; + public bool $enabled = true; + public int $quality = 80; public function generate(string $url, string $mimeType): string { @@ -48,7 +48,7 @@ public function generate(string $url, string $mimeType): string break; } - imagewebp($image, $filename, self::$quality); + imagewebp($image, $filename, $this->quality); imagedestroy($image); return $url; @@ -56,11 +56,11 @@ public function generate(string $url, string $mimeType): string public function setEnabled(bool $enabled): void { - self::$enabled = $enabled; + $this->enabled = $enabled; } public function getEnabled(): bool { - return self::$enabled; + return $this->enabled; } }