Passed
Push — master ( 50e989...69e622 )
by Aimeos
05:21
created
lib/mshoplib/src/MShop/Plugin/Provider/Order/Shipping.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,9 @@  discard block
 block discarded – undo
117 117
 				$this->checkThreshold( $order, $delivery->getPrice(), $config['threshold'] );
118 118
 			}
119 119
 		}
120
-		catch( \Aimeos\MShop\Order\Exception $oe ) {} // no delivery item available yet
120
+		catch( \Aimeos\MShop\Order\Exception $oe )
121
+		{
122
+} // no delivery item available yet
121 123
 
122 124
 		return true;
123 125
 	}
@@ -149,8 +151,7 @@  discard block
 block discarded – undo
149 151
 		{
150 152
 			$price->setRebate( $price->getCosts() );
151 153
 			$price->setCosts( '0.00' );
152
-		}
153
-		else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' )
154
+		} else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' )
154 155
 		{
155 156
 			$price->setCosts( $price->getRebate() );
156 157
 			$price->setRebate( '0.00' );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Base.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 		if( in_array( $op, $operators['combine'], true ) ) {
92 92
 			return $this->createCombineExpression( $op, (array) $value );
93
-		}
94
-		else if( in_array( $op, $operators['compare'], true ) ) {
93
+		} else if( in_array( $op, $operators['compare'], true ) ) {
95 94
 			return $this->createCompareExpression( $op, (array) $value );
96 95
 		}
97 96
 
@@ -145,11 +144,9 @@  discard block
 block discarded – undo
145 144
 
146 145
 			if( in_array( $op, $operators['combine'] ) ) {
147 146
 				$results[] = $this->createCombineExpression( $op, (array) $entry[$op] );
148
-			}
149
-			else if( in_array( $op, $operators['compare'] ) ) {
147
+			} else if( in_array( $op, $operators['compare'] ) ) {
150 148
 				$results[] = $this->createCompareExpression( $op, (array) $entry[$op] );
151
-			}
152
-			else {
149
+			} else {
153 150
 				throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid operator "%1$s"', $op ) );
154 151
 			}
155 152
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/attribute.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_attribute_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'mshop_attribute_type' );
14 14
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			return $schema;
32 32
 		},
33 33
 
34
-		'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
34
+		'mshop_attribute' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
35 35
 
36 36
 			$table = $schema->createTable( 'mshop_attribute' );
37 37
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			$table->addColumn( 'status', 'smallint', [] );
46 46
 			$table->addColumn( 'mtime', 'datetime', [] );
47 47
 			$table->addColumn( 'ctime', 'datetime', [] );
48
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
48
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
49 49
 
50 50
 			$table->setPrimaryKey( array( 'id' ), 'pk_msatt_id' );
51 51
 			$table->addUniqueIndex( array( 'siteid', 'domain', 'code', 'typeid' ), 'unq_msattr_sid_dom_cod_tid' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			return $schema;
60 60
 		},
61 61
 
62
-		'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
62
+		'mshop_attribute_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
63 63
 
64 64
 			$table = $schema->createTable( 'mshop_attribute_list_type' );
65 65
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			return $schema;
83 83
 		},
84 84
 
85
-		'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
85
+		'mshop_attribute_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
86 86
 
87 87
 			$table = $schema->createTable( 'mshop_attribute_list' );
88 88
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			return $schema;
121 121
 		},
122 122
 
123
-		'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
123
+		'mshop_attribute_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
124 124
 
125 125
 			$table = $schema->createTable( 'mshop_attribute_property_type' );
126 126
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			return $schema;
144 144
 		},
145 145
 
146
-		'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
146
+		'mshop_attribute_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
147 147
 
148 148
 			$table = $schema->createTable( 'mshop_attribute_property' );
149 149
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
12
+		{
12 13
 
13 14
 			$table = $schema->createTable( 'mshop_attribute_type' );
14 15
 
@@ -31,7 +32,8 @@  discard block
 block discarded – undo
31 32
 			return $schema;
32 33
 		},
33 34
 
34
-		'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
35
+		'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema )
36
+		{
35 37
 
36 38
 			$table = $schema->createTable( 'mshop_attribute' );
37 39
 
@@ -59,7 +61,8 @@  discard block
 block discarded – undo
59 61
 			return $schema;
60 62
 		},
61 63
 
62
-		'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
64
+		'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
65
+		{
63 66
 
64 67
 			$table = $schema->createTable( 'mshop_attribute_list_type' );
65 68
 
@@ -82,7 +85,8 @@  discard block
 block discarded – undo
82 85
 			return $schema;
83 86
 		},
84 87
 
85
-		'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
88
+		'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema )
89
+		{
86 90
 
87 91
 			$table = $schema->createTable( 'mshop_attribute_list' );
88 92
 
@@ -120,7 +124,8 @@  discard block
 block discarded – undo
120 124
 			return $schema;
121 125
 		},
122 126
 
123
-		'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
127
+		'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
128
+		{
124 129
 
125 130
 			$table = $schema->createTable( 'mshop_attribute_property_type' );
126 131
 
@@ -143,7 +148,8 @@  discard block
 block discarded – undo
143 148
 			return $schema;
144 149
 		},
145 150
 
146
-		'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
151
+		'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema )
152
+		{
147 153
 
148 154
 			$table = $schema->createTable( 'mshop_attribute_property' );
149 155
 
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Plugin/Provider/Order/ProductFreeOptionsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 		$attribute->setQuantity( 2 );
55 55
 		$attribute->setCode( 'size' );
56 56
 		$attribute->setType( 'config' );
57
-		$attribute->setAttributeId( $attrManager->findItem( 'xs', [], 'product', 'size')->getId() );
57
+		$attribute->setAttributeId( $attrManager->findItem( 'xs', [], 'product', 'size' )->getId() );
58 58
 
59 59
 		$product->setAttributeItem( $attribute );
60 60
 		$product->setProductId( $prodManager->findItem( 'CNE' )->getId() );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductFreeOptions.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@
 block discarded – undo
78 78
 			{
79 79
 				$list = $this->sortByPrice( $list, $attrQtys );
80 80
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, (int) $prodConf[$type] );
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, 0 );
85 84
 			}
Please login to merge, or discard this patch.
controller/common/src/Controller/Common/Media/Standard.php 2 patches
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 			$filepath = $this->getFilePath( $file->getClientFilename(), 'preview', $mimeprev );
62 62
 			$this->storeFile( $media->save( null, $mimetype ), $fsname, $filepath, $item->getPreview() );
63 63
 			$item->setPreview( $filepath );
64
-		}
65
-		else
64
+		} else
66 65
 		{
67 66
 			$mimetype = $media->getMimeType();
68 67
 			$item->setPreview( $this->getMimeIcon( $mimetype ) );
@@ -103,7 +102,9 @@  discard block
 block discarded – undo
103 102
 				$fs->rm( $path );
104 103
 			}
105 104
 		}
106
-		catch( \Exception $e ) { ; } // Can be a mime icon with relative path
105
+		catch( \Exception $e )
106
+		{
107
+; } // Can be a mime icon with relative path
107 108
 
108 109
 		$item->setPreview( '' );
109 110
 	}
@@ -486,7 +487,9 @@  discard block
 block discarded – undo
486 487
 				$fs->rm( $oldpath );
487 488
 			}
488 489
 		}
489
-		catch( \Aimeos\MW\Filesystem\Exception $e ) {} // continue if removing file fails
490
+		catch( \Aimeos\MW\Filesystem\Exception $e )
491
+		{
492
+} // continue if removing file fails
490 493
 
491 494
 		$fs->write( $filepath, $content );
492 495
 	}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
 				$fs->rm( $path );
104 104
 			}
105 105
 		}
106
-		catch( \Exception $e ) { ; } // Can be a mime icon with relative path
106
+		catch( \Exception $e ) {; } // Can be a mime icon with relative path
107 107
 
108 108
 		$item->setPreview( '' );
109 109
 	}
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Service/Provider/Payment/PayPalExpressTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -225,7 +225,8 @@
 block discarded – undo
225 225
 			->will( $this->returnValue( $response ) )
226 226
 			->with( $this->equalTo( 200 ) );
227 227
 
228
-		$cmpFcn = function( $subject ) {
228
+		$cmpFcn = function( $subject )
229
+		{
229 230
 			return $subject->getPaymentStatus() === \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED;
230 231
 		};
231 232
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Quantity.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
 				foreach( $products as $prodItem ) { // calculate bundled products
99 99
 					$sum += $qty * $prodItem->getQuantity();
100 100
 				}
101
-			}
102
-			else
101
+			} else
103 102
 			{
104 103
 				$sum += $qty;
105 104
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/media.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'mshop_media_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_media_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'mshop_media_type' );
14 14
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			return $schema;
32 32
 		},
33 33
 
34
-		'mshop_media' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
34
+		'mshop_media' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
35 35
 
36 36
 			$table = $schema->createTable( 'mshop_media' );
37 37
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$table->addColumn( 'status', 'smallint', [] );
48 48
 			$table->addColumn( 'mtime', 'datetime', [] );
49 49
 			$table->addColumn( 'ctime', 'datetime', [] );
50
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
50
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
51 51
 
52 52
 			$table->setPrimaryKey( array( 'id' ), 'pk_msmed_id' );
53 53
 			$table->addIndex( array( 'siteid', 'domain', 'langid' ), 'idx_msmed_sid_dom_langid' );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 			return $schema;
63 63
 		},
64 64
 
65
-		'mshop_media_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
65
+		'mshop_media_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
66 66
 
67 67
 			$table = $schema->createTable( 'mshop_media_list_type' );
68 68
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			return $schema;
86 86
 		},
87 87
 
88
-		'mshop_media_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
88
+		'mshop_media_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
89 89
 
90 90
 			$table = $schema->createTable( 'mshop_media_list' );
91 91
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			return $schema;
124 124
 		},
125 125
 
126
-		'mshop_media_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
126
+		'mshop_media_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
127 127
 
128 128
 			$table = $schema->createTable( 'mshop_media_property_type' );
129 129
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 			return $schema;
147 147
 		},
148 148
 
149
-		'mshop_media_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
149
+		'mshop_media_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
150 150
 
151 151
 			$table = $schema->createTable( 'mshop_media_property' );
152 152
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'mshop_media_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_media_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
12
+		{
12 13
 
13 14
 			$table = $schema->createTable( 'mshop_media_type' );
14 15
 
@@ -31,7 +32,8 @@  discard block
 block discarded – undo
31 32
 			return $schema;
32 33
 		},
33 34
 
34
-		'mshop_media' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
35
+		'mshop_media' => function ( \Doctrine\DBAL\Schema\Schema $schema )
36
+		{
35 37
 
36 38
 			$table = $schema->createTable( 'mshop_media' );
37 39
 
@@ -62,7 +64,8 @@  discard block
 block discarded – undo
62 64
 			return $schema;
63 65
 		},
64 66
 
65
-		'mshop_media_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
67
+		'mshop_media_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
68
+		{
66 69
 
67 70
 			$table = $schema->createTable( 'mshop_media_list_type' );
68 71
 
@@ -85,7 +88,8 @@  discard block
 block discarded – undo
85 88
 			return $schema;
86 89
 		},
87 90
 
88
-		'mshop_media_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
91
+		'mshop_media_list' => function ( \Doctrine\DBAL\Schema\Schema $schema )
92
+		{
89 93
 
90 94
 			$table = $schema->createTable( 'mshop_media_list' );
91 95
 
@@ -123,7 +127,8 @@  discard block
 block discarded – undo
123 127
 			return $schema;
124 128
 		},
125 129
 
126
-		'mshop_media_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
130
+		'mshop_media_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
131
+		{
127 132
 
128 133
 			$table = $schema->createTable( 'mshop_media_property_type' );
129 134
 
@@ -146,7 +151,8 @@  discard block
 block discarded – undo
146 151
 			return $schema;
147 152
 		},
148 153
 
149
-		'mshop_media_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
154
+		'mshop_media_property' => function ( \Doctrine\DBAL\Schema\Schema $schema )
155
+		{
150 156
 
151 157
 			$table = $schema->createTable( 'mshop_media_property' );
152 158
 
Please login to merge, or discard this patch.