Passed
Push — master ( 47e37b...2360ce )
by Aimeos
05:11
created
lib/mshoplib/setup/MShopAddDataAbstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@
 block discarded – undo
103 103
 
104 104
 				$attrManager->saveItem( $item );
105 105
 				$id = $item->getId();
106
-			}
107
-			else
106
+			} else
108 107
 			{
109 108
 				$id = $attrItem->getId();
110 109
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddLocaleData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,9 +240,13 @@
 block discarded – undo
240 240
 			$localeItem->setPosition( $dataset['pos'] );
241 241
 			$localeItem->setStatus( $dataset['status'] );
242 242
 
243
-			try {
243
+			try
244
+			{
244 245
 				$localeItemManager->saveItem( $localeItem );
245
-			} catch( \Exception $e ) {; } // if locale combination was already available
246
+			}
247
+			catch( \Exception $e )
248
+			{
249
+; } // if locale combination was already available
246 250
 		}
247 251
 
248 252
 		$this->status( 'done' );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Context/Item/Iface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * Returns the message queue manager object.
163 163
 	 *
164 164
 	 * @return \Aimeos\MW\MQueue\Manager\Iface Message queue manager object
165
-	*/
165
+	 */
166 166
 	public function getMessageQueueManager();
167 167
 
168 168
 	/**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * Returns the process object.
187 187
 	 *
188 188
 	 * @return \Aimeos\MW\Process\Iface Process object
189
-	*/
189
+	 */
190 190
 	public function getProcess();
191 191
 
192 192
 	/**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 * Returns the session object.
202 202
 	 *
203 203
 	 * @return \Aimeos\MW\Session\Iface Session object
204
-	*/
204
+	 */
205 205
 	public function getSession();
206 206
 
207 207
 	/**
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/schema/product.php 1 patch
Spacing   +8 added lines, -8 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_product_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'mshop_product_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
12 12
 
13 13
 			$table = $schema->createTable( 'mshop_product_type' );
14 14
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			return $schema;
32 32
 		},
33 33
 
34
-		'mshop_product' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
34
+		'mshop_product' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
35 35
 
36 36
 			$table = $schema->createTable( 'mshop_product' );
37 37
 
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 			$table->addColumn( 'status', 'smallint', [] );
47 47
 			$table->addColumn( 'mtime', 'datetime', [] );
48 48
 			$table->addColumn( 'ctime', 'datetime', [] );
49
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
50
-			$table->addColumn( 'target', 'string', array('length' => 255 ) );
49
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
50
+			$table->addColumn( 'target', 'string', array( 'length' => 255 ) );
51 51
 
52 52
 			$table->setPrimaryKey( array( 'id' ), 'pk_mspro_id' );
53 53
 			$table->addUniqueIndex( array( 'siteid', 'code' ), 'unq_mspro_siteid_code' );
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			return $schema;
65 65
 		},
66 66
 
67
-		'mshop_product_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
67
+		'mshop_product_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
68 68
 
69 69
 			$table = $schema->createTable( 'mshop_product_list_type' );
70 70
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			return $schema;
88 88
 		},
89 89
 
90
-		'mshop_product_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
90
+		'mshop_product_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
91 91
 
92 92
 			$table = $schema->createTable( 'mshop_product_list' );
93 93
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			return $schema;
126 126
 		},
127 127
 
128
-		'mshop_product_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
128
+		'mshop_product_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
129 129
 
130 130
 			$table = $schema->createTable( 'mshop_product_property_type' );
131 131
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			return $schema;
149 149
 		},
150 150
 
151
-		'mshop_product_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
151
+		'mshop_product_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
152 152
 
153 153
 			$table = $schema->createTable( 'mshop_product_property' );
154 154
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Order/Manager/Base/Base.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -385,8 +385,7 @@  discard block
 block discarded – undo
385 385
 				$attributes[$attribute->getParentId()][] = $attribute;
386 386
 				$attribute->setParentId( null );
387 387
 				$attribute->setId( null );
388
-			}
389
-			else
388
+			} else
390 389
 			{
391 390
 				$attributes[$attribute->getParentId()][$id] = $attribute;
392 391
 			}
@@ -405,8 +404,7 @@  discard block
 block discarded – undo
405 404
 				$map[$item->getBaseId()][$item->getPosition()] = $item;
406 405
 
407 406
 				$subProducts = [];
408
-			}
409
-			else
407
+			} else
410 408
 			{	// in case it's a sub-product
411 409
 				$subProducts[$item->getPosition()] = $item;
412 410
 			}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Payment/DirectDebit.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
 				$feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln;
82 82
 			}
83 83
 		}
84
-		catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available
84
+		catch( \Aimeos\MShop\Order\Exception $e )
85
+		{
86
+; } // If address isn't available
85 87
 
86 88
 		return $this->getConfigItems( $feconfig );
87 89
 	}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 				$feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln;
82 82
 			}
83 83
 		}
84
-		catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available
84
+		catch( \Aimeos\MShop\Order\Exception $e ) {; } // If address isn't available
85 85
 
86 86
 		return $this->getConfigItems( $feconfig );
87 87
 	}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Catalog/Manager/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -612,7 +612,7 @@
 block discarded – undo
612 612
 			$cfgPathCount = 'mshop/catalog/manager/standard/count';
613 613
 
614 614
 			if( $search->getSortations() === [] ) {
615
-				$search->setSortations( [$search->sort( '+', 'catalog.left')] );
615
+				$search->setSortations( [$search->sort( '+', 'catalog.left' )] );
616 616
 			}
617 617
 
618 618
 			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -719,9 +719,12 @@  discard block
 block discarded – undo
719 719
 
720 720
 		foreach( $sitePath as $siteId )
721 721
 		{
722
-			try {
722
+			try
723
+			{
723 724
 				$path = $this->createTreeManager( $siteId )->getPath( $id );
724
-			} catch( \Exception $e ) {
725
+			}
726
+			catch( \Exception $e )
727
+			{
725 728
 				continue;
726 729
 			}
727 730
 
@@ -756,9 +759,12 @@  discard block
 block discarded – undo
756 759
 
757 760
 		foreach( $sitePath as $siteId )
758 761
 		{
759
-			try {
762
+			try
763
+			{
760 764
 				$node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria );
761
-			} catch( \Exception $e ) {
765
+			}
766
+			catch( \Exception $e )
767
+			{
762 768
 				continue;
763 769
 			}
764 770
 
@@ -838,8 +844,7 @@  discard block
 block discarded – undo
838 844
 				if( $child->getParentId() !== $item->getParentId() ) {
839 845
 					$this->moveItem( $child->getId(), $item->getParentId(), $child->getParentId() );
840 846
 				}
841
-			}
842
-			else
847
+			} else
843 848
 			{
844 849
 				$this->insertItem( $child, $item->getId() );
845 850
 			}
@@ -914,8 +919,7 @@  discard block
 block discarded – undo
914 919
 				 * @see mshop/catalog/manager/standard/insert-usage/ansi
915 920
 				 */
916 921
 				$path = 'mshop/catalog/manager/standard/update-usage';
917
-			}
918
-			else
922
+			} else
919 923
 			{
920 924
 				/** mshop/catalog/manager/standard/insert-usage/mysql
921 925
 				 * Updates the config, editor, ctime and mtime value of an inserted record
@@ -971,8 +975,7 @@  discard block
 block discarded – undo
971 975
 			{
972 976
 				$stmt->bind( 5, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
973 977
 				$stmt->bind( 6, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
974
-			}
975
-			else
978
+			} else
976 979
 			{
977 980
 				$stmt->bind( 5, $date ); // ctime
978 981
 				$stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/OnceTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	public function testIsAvailable()
44 44
 	{
45 45
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'ABCD' );
46
-		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD');
46
+		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD' );
47 47
 		$object->setObject( $object );
48 48
 
49 49
 		$this->assertTrue( $object->isAvailable( $this->orderBase ) );
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	public function testIsAvailableExisting()
54 54
 	{
55 55
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'OPQR' );
56
-		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR');
56
+		$object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR' );
57 57
 		$object->setObject( $object );
58 58
 
59 59
 		$this->assertFalse( $object->isAvailable( $this->orderBase ) );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Price/Item/Standard.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@
 block discarded – undo
380 380
 	 *
381 381
 	 * @param boolean $flag True if tax is included in the price value, costs and rebate, false if not
382 382
 	 * @return \Aimeos\MShop\Price\Item\Iface Price item for chaining method calls
383
-	*/
383
+	 */
384 384
 	public function setTaxFlag( $flag )
385 385
 	{
386 386
 		if( (bool) $flag !== $this->getTaxFlag() )
Please login to merge, or discard this patch.