Skip to content

Commit 4806e65

Browse files
authored
Merge pull request #9744 from samsonasik/refactor-apply-code-quality-52
refactor: apply code quality level 52 for Rector
2 parents b935aa0 + d66cd5c commit 4806e65

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@
202202
// keep '\\' prefix string on string '\Foo\Bar'
203203
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
204204
])
205-
->withCodeQualityLevel(51);
205+
->withCodeQualityLevel(52);

system/Images/Handlers/ImageMagickHandler.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,8 @@ protected function ensureResource()
317317
*/
318318
protected function supportedFormatCheck()
319319
{
320-
switch ($this->image()->imageType) {
321-
case IMAGETYPE_WEBP:
322-
if (! in_array('WEBP', Imagick::queryFormats(), true)) {
323-
throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported'));
324-
}
325-
break;
320+
if ($this->image()->imageType === IMAGETYPE_WEBP && ! in_array('WEBP', Imagick::queryFormats(), true)) {
321+
throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported'));
326322
}
327323
}
328324

0 commit comments

Comments
 (0)