Passed
Push — master ( 8e0f36...cdb6de )
by Aimeos
06:20
created
lib/mwlib/src/MW/Media/Image/Imagick.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 			{
51 51
 				$this->image->setImageAlphaChannel( \Imagick::ALPHACHANNEL_ACTIVATE );
52 52
 				$this->image->setImageBackgroundColor( $options['image']['background'] ?? 'transparent' );
53
-			}
54
-			else
53
+			} else
55 54
 			{
56 55
 				$this->image->setImageBackgroundColor( $options['image']['background'] ?? '#ffffff' );
57 56
 			}
@@ -174,15 +173,13 @@  discard block
 block discarded – undo
174 173
 				$newMedia->image->cropThumbnailImage( (int) $width, (int) $height );
175 174
 				// see https://www.php.net/manual/en/imagick.cropthumbnailimage.php#106710
176 175
 				$newMedia->image->setImagePage( 0, 0, 0, 0 );
177
-			}
178
-			elseif( $fit === 1 && $width && $height )
176
+			} elseif( $fit === 1 && $width && $height )
179 177
 			{
180 178
 				$w = ( $width - $newMedia->image->getImageWidth() ) / 2;
181 179
 				$h = ( $height - $newMedia->image->getImageHeight() ) / 2;
182 180
 
183 181
 				$newMedia->image->extentImage( $width, $height, (int) -$w, (int) -$h );
184
-			}
185
-			else
182
+			} else
186 183
 			{
187 184
 				$w = $this->image->getImageWidth();
188 185
 				$h = $this->image->getImageHeight();
@@ -267,8 +264,7 @@  discard block
 block discarded – undo
267 264
 			$wmimage = clone self::$wmimg;
268 265
 			$wmimage->resizeImage( $ww, $wh, \Imagick::FILTER_CUBIC, 0.8 );
269 266
 			self::$wmimages[$ww . 'x' . $wh] = $wmimage;
270
-		}
271
-		else
267
+		} else
272 268
 		{
273 269
 			$wmimage = self::$wmimages[$ww . 'x' . $wh];
274 270
 		}
Please login to merge, or discard this patch.