Skip to content

Commit

Permalink
Update WebpGenerator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisprins93 authored Sep 7, 2022
1 parent 1f962bc commit 8aa923e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/WebpGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -48,19 +48,19 @@ public function generate(string $url, string $mimeType): string
break;
}

imagewebp($image, $filename, self::$quality);
imagewebp($image, $filename, $this->quality);
imagedestroy($image);

return $url;
}

public function setEnabled(bool $enabled): void
{
self::$enabled = $enabled;
$this->enabled = $enabled;
}

public function getEnabled(): bool
{
return self::$enabled;
return $this->enabled;
}
}

0 comments on commit 8aa923e

Please sign in to comment.