Passed
Push — master ( e7fbd1...801d58 )
by Aimeos
14:45
created
up.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,21 +46,18 @@
 block discarded – undo
46 46
 				{
47 47
 					$options[$name] = (array) $options[$name];
48 48
 					$options[$name][] = substr( $option, $pos + 1 );
49
-				}
50
-				else
49
+				} else
51 50
 				{
52 51
 					$options[$name] = substr( $option, $pos + 1 );
53 52
 				}
54 53
 
55 54
 				unset( $params[$key] );
56
-			}
57
-			else
55
+			} else
58 56
 			{
59 57
 				printf( "Invalid option \"%1\$s\"\n", $option );
60 58
 				usage();
61 59
 			}
62
-		}
63
-		elseif( $option[0] === '-' )
60
+		} elseif( $option[0] === '-' )
64 61
 		{
65 62
 			$options[$option[1]] = substr( $option, 1 );
66 63
 			unset( $params[$key] );
Please login to merge, or discard this patch.
setup/unittest/BaseAddTestData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,9 +173,13 @@
 block discarded – undo
173 173
 
174 174
 				foreach( $testdata[$domain] as $entry )
175 175
 				{
176
-					try {
176
+					try
177
+					{
177 178
 						$manager->save( $manager->create()->fromArray( $entry ), false );
178
-					} catch( \Exception $e ) {} // Duplicate entry
179
+					}
180
+					catch( \Exception $e )
181
+					{
182
+} // Duplicate entry
179 183
 				}
180 184
 			}
181 185
 		}
Please login to merge, or discard this patch.
setup/MShopAddAttributeData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e ) {; } // if attribute was already available
54 54
 		}
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e )
54
+			{
55
+; } // if attribute was already available
54 56
 		}
55 57
 	}
56 58
 }
Please login to merge, or discard this patch.
setup/MShopAddDataAbstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 
90 90
 				$attrManager->save( $item );
91 91
 				$id = $item->getId();
92
-			}
93
-			else
92
+			} else
94 93
 			{
95 94
 				$id = $attrItem->getId();
96 95
 			}
Please login to merge, or discard this patch.
setup/default/DemoAddProductData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \Exception $e ) { ; } // attribute doesn't exist yet
168
+				catch( \Exception $e ) {; } // attribute doesn't exist yet
169 169
 
170 170
 				$refItem = $this->addRefItems( $refItem, $data );
171 171
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,9 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \Exception $e ) { ; } // attribute doesn't exist yet
168
+				catch( \Exception $e )
169
+				{
170
+; } // attribute doesn't exist yet
169 171
 
170 172
 				$refItem = $this->addRefItems( $refItem, $data );
171 173
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
setup/MShopAddPluginData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,13 @@
 block discarded – undo
85 85
 				$item->setPosition( $dataset['position'] );
86 86
 			}
87 87
 
88
-			try {
88
+			try
89
+			{
89 90
 				$pluginManager->save( $item );
90
-			} catch( \Exception $e ) {; } // if plugin configuration was already available
91
+			}
92
+			catch( \Exception $e )
93
+			{
94
+; } // if plugin configuration was already available
91 95
 		}
92 96
 	}
93 97
 }
Please login to merge, or discard this patch.
tests/MShop/Plugin/Provider/ExceptionTest.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function test()
28 28
 	{
29
-		try {
29
+		try
30
+		{
30 31
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg', 13, null, $this->codes );
31 32
 		}
32 33
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $mppe )
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
 			$this->assertEquals( $this->codes, $mppe->getErrorCodes() );
37 38
 		}
38 39
 
39
-		try {
40
+		try
41
+		{
40 42
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg2', 11 );
41 43
 		}
42 44
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
Please login to merge, or discard this patch.
src/MW/Media/Image/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,8 +196,7 @@  discard block
 block discarded – undo
196 196
 			$ratio = ( $w < $h ? $width / $w : $height / $h );
197 197
 			$newHeight = (int) $h * $ratio;
198 198
 			$newWidth = (int) $w * $ratio;
199
-		}
200
-		else
199
+		} else
201 200
 		{
202 201
 			list( $newWidth, $newHeight ) = $this->getSizeFitted( $w, $h, $width, $height );
203 202
 
@@ -261,8 +260,7 @@  discard block
 block discarded – undo
261 260
 
262 261
 			imagedestroy( $result );
263 262
 			$newMedia->image = $newImage;
264
-		}
265
-		else
263
+		} else
266 264
 		{
267 265
 			$newMedia->image = $result;
268 266
 		}
Please login to merge, or discard this patch.
src/MW/Media/Factory.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,25 +38,21 @@
 block discarded – undo
38 38
 			if( ( $content = stream_get_contents( $file ) ) === false ) {
39 39
 				throw new \Aimeos\MW\Media\Exception( sprintf( 'Unable to read from stream' ) );
40 40
 			}
41
-		}
42
-		elseif( $file instanceof \Psr\Http\Message\StreamInterface )
41
+		} elseif( $file instanceof \Psr\Http\Message\StreamInterface )
43 42
 		{
44 43
 			$content = $file->getContents();
45
-		}
46
-		elseif( is_string( $file ) )
44
+		} elseif( is_string( $file ) )
47 45
 		{
48 46
 			if( strpos( $file, "\0" ) === false && is_file( $file ) )
49 47
 			{
50 48
 				if( ( $content = file_get_contents( $file ) ) === false ) {
51 49
 					throw new \Aimeos\MW\Media\Exception( sprintf( 'Unable to read from file "%1$s"', $file ) );
52 50
 				}
53
-			}
54
-			else
51
+			} else
55 52
 			{
56 53
 				$content = $file;
57 54
 			}
58
-		}
59
-		else
55
+		} else
60 56
 		{
61 57
 			throw new \Aimeos\MW\Media\Exception( 'Unsupported file parameter type' );
62 58
 		}
Please login to merge, or discard this patch.