Completed
Push — master ( 6b7d3b...36f68c )
by Aimeos
10:40
created
lib/mwlib/src/MW/Media/Image/Standard.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		parent::__construct( $mimetype );
42 42
 
43 43
 		if( ( $this->image = @imagecreatefromstring( $content ) ) === false ) {
44
-			throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.') );
44
+			throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.' ) );
45 45
 		}
46 46
 
47 47
 		if( ( $this->info = getimagesizefromstring( $content ) ) === false ) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		}
50 50
 
51 51
 		if( imagealphablending( $this->image, false ) === false ) {
52
-			throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') );
52
+			throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) );
53 53
 		}
54 54
 
55 55
 		$this->options = $options;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				case 'image/png':
116 116
 
117 117
 					if( imagesavealpha( $this->image, true ) === false ) {
118
-						throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)') );
118
+						throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)' ) );
119 119
 					}
120 120
 
121 121
 					if( @imagepng( $this->image, $filename, (int) 10 - $quality / 10 ) === false ) {
@@ -198,15 +198,15 @@  discard block
 block discarded – undo
198 198
 		try
199 199
 		{
200 200
 			if( imagealphablending( $newImage, false ) === false ) {
201
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') );
201
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) );
202 202
 			}
203 203
 
204 204
 			if( ( $transparent = imagecolorallocatealpha( $newImage, 255, 255, 255, 127 ) ) === false ) {
205
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)') );
205
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)' ) );
206 206
 			}
207 207
 
208 208
 			if( imagefilledrectangle( $newImage, 0, 0, $destWidth, $destHeight, $transparent ) === false ) {
209
-				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)') );
209
+				throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)' ) );
210 210
 			}
211 211
 
212 212
 			if( imagecopyresampled( $newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight ) === false ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 			$this->setCode( $key );
68 68
 			$this->values['id'] = $this->values['code'];
69 69
 			$this->modified = false;
70
-		}
71
-		else
70
+		} else
72 71
 		{
73 72
 			$this->values['id'] = null;
74 73
 			$this->modified = true;
Please login to merge, or discard this patch.