diff --git a/rector.php b/rector.php index 50248202373a..44c1d838c7e4 100644 --- a/rector.php +++ b/rector.php @@ -202,4 +202,4 @@ // keep '\\' prefix string on string '\Foo\Bar' StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, ]) - ->withCodeQualityLevel(51); + ->withCodeQualityLevel(52); diff --git a/system/Images/Handlers/ImageMagickHandler.php b/system/Images/Handlers/ImageMagickHandler.php index 58bb0c912b94..bae055b17166 100644 --- a/system/Images/Handlers/ImageMagickHandler.php +++ b/system/Images/Handlers/ImageMagickHandler.php @@ -317,12 +317,8 @@ protected function ensureResource() */ protected function supportedFormatCheck() { - switch ($this->image()->imageType) { - case IMAGETYPE_WEBP: - if (! in_array('WEBP', Imagick::queryFormats(), true)) { - throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported')); - } - break; + if ($this->image()->imageType === IMAGETYPE_WEBP && ! in_array('WEBP', Imagick::queryFormats(), true)) { + throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported')); } }