Passed
Push — master ( f21277...f08cc9 )
by Aimeos
04:50
created
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/RequiredTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 		$this->couponItem = \Aimeos\MShop\Coupon\Manager\Factory::createManager( $context )->createItem();
34 34
 
35 35
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $context, $this->couponItem, 'abcd' );
36
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Required( $provider, $context, $this->couponItem, 'abcd');
36
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Required( $provider, $context, $this->couponItem, 'abcd' );
37 37
 		$this->object->setObject( $this->object );
38 38
 
39 39
 		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( $context );
Please login to merge, or discard this patch.
Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
 			{
253 253
 				$name = $file->getFilename();
254 254
 
255
-				if( $file->isFile() && preg_match('/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) {
255
+				if( $file->isFile() && preg_match( '/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) {
256 256
 					$list[$name] = null;
257 257
 				}
258 258
 			}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/View/Helper/Response/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	 * @return self
153 153
 	 * @throws \InvalidArgumentException for invalid header names or values.
154 154
 	 */
155
-	public function withHeader($name, $value )
155
+	public function withHeader( $name, $value )
156 156
 	{
157 157
 		$this->response = $this->response->withHeader( $name, $value );
158 158
 		return $this;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 *
104 104
 	 * @param string $version HTTP protocol version
105 105
 	 * @return self
106
-	*/
106
+	 */
107 107
 	public function withProtocolVersion( $version )
108 108
 	{
109 109
 		$this->response = $this->response->withProtocolVersion( $version );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @return string[][] Returns an associative array of the message's headers.
118 118
 	 *	 Each key MUST be a header name, and each value MUST be an array of
119 119
 	 *	 strings for that header.
120
-	*/
120
+	 */
121 121
 	public function getHeaders()
122 122
 	{
123 123
 		return $this->response->getHeaders();
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Weight.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,9 +97,11 @@
 block discarded – undo
97 97
 			$code = $basketItem->getProductCode();
98 98
 			$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
99 99
 
100
-			foreach( $basketItem->getProducts() as $prodItem ) // calculate bundled products
100
+			foreach( $basketItem->getProducts() as $prodItem ) {
101
+				// calculate bundled products
101 102
 			{
102 103
 				$qty = $prodItem->getQuantity();
104
+			}
103 105
 				$code = $prodItem->getProductCode();
104 106
 				$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
105 107
 			}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			}
105 105
 		}
106 106
 
107
-		if ($this->checkWeightScale( $this->getWeight( $prodMap ) ) === false) {
107
+		if( $this->checkWeightScale( $this->getWeight( $prodMap ) ) === false ) {
108 108
 			return false;
109 109
 		}
110 110
 
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 		$min = $this->getConfigValue( array( 'weight.min' ) );
124 124
 		$max = $this->getConfigValue( array( 'weight.max' ) );
125 125
 
126
-		if( $min !== null && ( (float) $min) > $basketWeight ) {
126
+		if( $min !== null && ( (float) $min ) > $basketWeight ) {
127 127
 			return false;
128 128
 		}
129 129
 
130
-		if( $max !== null && ( (float) $max) < $basketWeight ) {
130
+		if( $max !== null && ( (float) $max ) < $basketWeight ) {
131 131
 			return false;
132 132
 		}
133 133
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 		foreach( $manager->searchItems( $search, ['product/property'] ) as $product )
157 157
 		{
158 158
 			foreach( $product->getPropertyItems( 'package-weight' ) as $property ) {
159
-				$weight += ((float) $property->getValue()) * $prodMap[$product->getCode()];
159
+				$weight += ( (float) $property->getValue() ) * $prodMap[$product->getCode()];
160 160
 			}
161 161
 		}
162 162
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/MQueue/Standard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		parent::__construct( $config );
34 34
 
35
-		try {
35
+		try
36
+		{
36 37
 			$this->conn = $this->createConnection();
37
-		} catch( \Aimeos\MW\DB\Exception $e ) {
38
+		}
39
+		catch( \Aimeos\MW\DB\Exception $e )
40
+		{
38 41
 			throw new \Aimeos\MW\MQueue\Exception( $e->getMessage() );
39 42
 		}
40 43
 	}
@@ -85,8 +88,7 @@  discard block
 block discarded – undo
85 88
 		{
86 89
 			$dsn .= isset( $host ) ? ';host=' . $host : '';
87 90
 			$dsn .= isset( $port ) ? ';port=' . $port : '';
88
-		}
89
-		else
91
+		} else
90 92
 		{
91 93
 			$dsn .= ';unix_socket=' . $sock;
92 94
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/MQueue/Queue/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 */
37 37
 	public function __construct( \Aimeos\MW\DB\Connection\Iface $conn, $queue, $sql, $rtime )
38 38
 	{
39
-		$this->cname = md5( microtime(true) . getmypid() );
39
+		$this->cname = md5( microtime( true ) . getmypid() );
40 40
 		$this->conn = $conn;
41 41
 		$this->queue = $queue;
42 42
 		$this->sql = $sql;
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Context/Item/StandardTest.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,9 @@  discard block
 block discarded – undo
207 207
 		$this->assertEquals( '123', $this->object->getUserId() );
208 208
 		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
209 209
 
210
-		$return = $this->object->setUserId( function() { return 456; } );
210
+		$return = $this->object->setUserId( function()
211
+		{
212
+return 456; } );
211 213
 		$this->assertEquals( '456', $this->object->getUserId() );
212 214
 		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
213 215
 	}
@@ -220,7 +222,9 @@  discard block
 block discarded – undo
220 222
 		$this->assertEquals( array( '123' ), $this->object->getGroupIds() );
221 223
 		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
222 224
 
223
-		$return = $this->object->setGroupIds( function() { return array( 456 ); } );
225
+		$return = $this->object->setGroupIds( function()
226
+		{
227
+return array( 456 ); } );
224 228
 		$this->assertEquals( array( '456' ), $this->object->getGroupIds() );
225 229
 		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
226 230
 	}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/cache.php 2 patches
Spacing   +2 added lines, -2 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
-		'madmin_cache' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'madmin_cache' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'madmin_cache' );
14 14
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 			return $schema;
24 24
 		},
25 25
 
26
-		'madmin_cache_tag' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
26
+		'madmin_cache_tag' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
27 27
 
28 28
 			$table = $schema->createTable( 'madmin_cache_tag' );
29 29
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 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
-		'madmin_cache' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'madmin_cache' => function ( \Doctrine\DBAL\Schema\Schema $schema )
12
+		{
12 13
 
13 14
 			$table = $schema->createTable( 'madmin_cache' );
14 15
 
@@ -23,7 +24,8 @@  discard block
 block discarded – undo
23 24
 			return $schema;
24 25
 		},
25 26
 
26
-		'madmin_cache_tag' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
27
+		'madmin_cache_tag' => function ( \Doctrine\DBAL\Schema\Schema $schema )
28
+		{
27 29
 
28 30
 			$table = $schema->createTable( 'madmin_cache_tag' );
29 31
 
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/catalog.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 return array(
10 10
 	'table' => array(
11 11
 
12
-		'mshop_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
+		'mshop_catalog' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
13 13
 
14 14
 			$table = $schema->createTable( 'mshop_catalog' );
15 15
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			return $schema;
36 36
 		},
37 37
 
38
-		'mshop_catalog_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
38
+		'mshop_catalog_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
39 39
 
40 40
 			$table = $schema->createTable( 'mshop_catalog_list_type' );
41 41
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			return $schema;
59 59
 		},
60 60
 
61
-		'mshop_catalog_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
61
+		'mshop_catalog_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
62 62
 
63 63
 			$table = $schema->createTable( 'mshop_catalog_list' );
64 64
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,8 @@  discard block
 block discarded – undo
9 9
 return array(
10 10
 	'table' => array(
11 11
 
12
-		'mshop_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
+		'mshop_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema )
13
+		{
13 14
 
14 15
 			$table = $schema->createTable( 'mshop_catalog' );
15 16
 
@@ -35,7 +36,8 @@  discard block
 block discarded – undo
35 36
 			return $schema;
36 37
 		},
37 38
 
38
-		'mshop_catalog_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
39
+		'mshop_catalog_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema )
40
+		{
39 41
 
40 42
 			$table = $schema->createTable( 'mshop_catalog_list_type' );
41 43
 
@@ -58,7 +60,8 @@  discard block
 block discarded – undo
58 60
 			return $schema;
59 61
 		},
60 62
 
61
-		'mshop_catalog_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
63
+		'mshop_catalog_list' => function ( \Doctrine\DBAL\Schema\Schema $schema )
64
+		{
62 65
 
63 66
 			$table = $schema->createTable( 'mshop_catalog_list' );
64 67
 
Please login to merge, or discard this patch.